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
20d8803c
Commit
20d8803c
authored
Dec 05, 2022
by
Ted Themistokleous
Browse files
Add definition for global_stride similar to removed device function
parent
86ff3faf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
+5
-1
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
View file @
20d8803c
...
...
@@ -59,7 +59,11 @@ __device__ void gather(const T& data_t, const U& indices_t, const V& output_t, S
auto
*
output_ptr
=
output_t
.
data
();
ind
.
global_stride
(
output_shape
.
elements
(),
[
&
](
auto
i
)
{
auto
idx
=
output_shape
.
multi
(
i
);
auto
in_index
=
indices_ptr
[
idx
[
axis
]];
in_index
=
(
in_index
<
0
)
?
in_index
+
axis_dim_size
:
in_index
;
idx
[
axis
]
=
in_index
;
output_ptr
[
i
]
=
indices_t
[
idx
];
});
}
...
...
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