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
6c057881
Commit
6c057881
authored
Jun 19, 2019
by
Paul
Browse files
Formatting
parent
e29e613f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
src/targets/gpu/device/gather.cpp
src/targets/gpu/device/gather.cpp
+5
-9
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
+1
-5
No files found.
src/targets/gpu/device/gather.cpp
View file @
6c057881
...
@@ -11,16 +11,12 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -11,16 +11,12 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
gather
(
hipStream_t
stream
,
argument
gather
(
hipStream_t
stream
,
argument
result
,
argument
arg1
,
argument
arg2
,
int
axis
)
argument
result
,
argument
arg1
,
argument
arg2
,
int
axis
)
{
{
auto
axis_index
=
(
axis
<
0
)
?
(
axis
+
arg1
.
get_shape
().
lens
().
size
())
:
axis
;
auto
axis_index
=
(
axis
<
0
)
?
(
axis
+
arg1
.
get_shape
().
lens
().
size
())
:
axis
;
auto
&
input_shape
=
arg1
.
get_shape
();
auto
&
input_shape
=
arg1
.
get_shape
();
auto
lens
=
input_shape
.
lens
();
auto
lens
=
input_shape
.
lens
();
lens
[
axis_index
]
=
arg2
.
get_shape
().
elements
();
lens
[
axis_index
]
=
arg2
.
get_shape
().
elements
();
std
::
size_t
nelements
=
result
.
get_shape
().
elements
();
std
::
size_t
nelements
=
result
.
get_shape
().
elements
();
visit_all
(
result
,
arg1
)([
&
](
auto
output
,
auto
input
)
{
visit_all
(
result
,
arg1
)([
&
](
auto
output
,
auto
input
)
{
arg2
.
visit
([
&
](
auto
indices
)
{
arg2
.
visit
([
&
](
auto
indices
)
{
...
...
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
View file @
6c057881
...
@@ -10,11 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -10,11 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
gather
(
hipStream_t
stream
,
argument
gather
(
hipStream_t
stream
,
argument
result
,
argument
arg1
,
argument
arg2
,
int
axis
);
argument
result
,
argument
arg1
,
argument
arg2
,
int
axis
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
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