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
ca95d474
Commit
ca95d474
authored
Dec 12, 2022
by
Ted Themistokleous
Browse files
Fix tidy for Axis template parameter
parent
69140d27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
+5
-5
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/gather.hpp
View file @
ca95d474
...
@@ -30,24 +30,24 @@
...
@@ -30,24 +30,24 @@
namespace
migraphx
{
namespace
migraphx
{
template
<
int
a
xis
,
class
T
,
class
U
,
class
V
>
template
<
int
A
xis
,
class
T
,
class
U
,
class
V
>
__device__
void
gather
(
const
T
&
data_t
,
const
U
&
indices_t
,
const
V
&
output_t
)
__device__
void
gather
(
const
T
&
data_t
,
const
U
&
indices_t
,
const
V
&
output_t
)
{
{
auto
ind
=
make_index
();
auto
ind
=
make_index
();
auto
lengths
=
data_t
.
get_shape
().
lens
;
auto
lengths
=
data_t
.
get_shape
().
lens
;
auto
axis_dim_size
=
lengths
[
a
xis
];
auto
axis_dim_size
=
lengths
[
A
xis
];
lengths
[
a
xis
]
=
indices_t
.
get_shape
().
elements
();
lengths
[
A
xis
]
=
indices_t
.
get_shape
().
elements
();
auto
out_comp
=
make_shape
(
lengths
,
output_t
.
get_shape
().
strides
);
auto
out_comp
=
make_shape
(
lengths
,
output_t
.
get_shape
().
strides
);
ind
.
global_stride
(
output_t
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
ind
.
global_stride
(
output_t
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
auto
idx
=
out_comp
.
multi
(
i
);
auto
idx
=
out_comp
.
multi
(
i
);
auto
in_index
=
indices_t
[
idx
[
a
xis
]];
auto
in_index
=
indices_t
[
idx
[
A
xis
]];
auto
new_in_index
=
(
in_index
<
0
)
?
in_index
+
axis_dim_size
:
in_index
;
auto
new_in_index
=
(
in_index
<
0
)
?
in_index
+
axis_dim_size
:
in_index
;
idx
[
a
xis
]
=
new_in_index
;
idx
[
A
xis
]
=
new_in_index
;
output_t
[
i
]
=
data_t
[
idx
];
output_t
[
i
]
=
data_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