Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
0003e8a6
"magic_pdf/vscode:/vscode.git/clone" did not exist on "1c74ed8ea8991e27935544a8adc21740a354cd39"
Commit
0003e8a6
authored
Nov 06, 2023
by
Umang Yadav
Browse files
disable vectorization
parent
6d45d740
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/targets/gpu/kernels/include/migraphx/kernels/vectorize.hpp
...argets/gpu/kernels/include/migraphx/kernels/vectorize.hpp
+4
-7
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/vectorize.hpp
View file @
0003e8a6
...
...
@@ -24,6 +24,7 @@
#ifndef MIGRAPHX_GUARD_KERNELS_VECTORIZE_HPP
#define MIGRAPHX_GUARD_KERNELS_VECTORIZE_HPP
#include "migraphx/kernels/type_traits.hpp"
#include <migraphx/kernels/tensor_view.hpp>
#include <migraphx/kernels/vec.hpp>
...
...
@@ -78,8 +79,6 @@ __device__ __host__ auto as_vec(T x, Axis axis)
{
if
constexpr
(
N
<
2
)
return
x
;
else
if
constexpr
(
is_same
<
decltype
(
x
),
migraphx
::
fp8e4m3fnuz
>
{})
return
x
;
else
return
make_tensor_view
(
as_vec
<
N
>
(
remove_bool
(
x
.
data
())),
shape_step
<
N
>
(
x
.
get_shape
(),
axis
));
...
...
@@ -92,10 +91,6 @@ constexpr auto tensor_step(T x, Axis axis)
{
return
x
;
}
else
if
(
is_same
<
T
,
migraphx
::
fp8e4m3fnuz
>
{})
{
return
x
;
}
else
{
constexpr
auto
s
=
decltype
(
x
.
get_shape
()){};
...
...
@@ -242,7 +237,9 @@ template <index_int N, index_int Axis, class T>
__device__
__host__
auto
vectorize_tensor
(
T
x
)
{
constexpr
auto
shape
=
get_shape_c
<
T
>
{};
if
constexpr
(
shape
.
lens
[
Axis
]
==
1
)
if
constexpr
(
is_same
<
typename
T
::
type
,
migraphx
::
fp8e4m3fnuz
>
{})
return
x
;
else
if
constexpr
(
shape
.
lens
[
Axis
]
==
1
)
return
x
;
else
if
constexpr
(
shape
.
strides
[
Axis
]
==
0
)
return
tensor_step
<
N
>
(
x
,
_c
<
Axis
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment