Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
7af75b2e
Commit
7af75b2e
authored
Aug 25, 2018
by
Paul
Browse files
Try to fix the tests
parent
59c4cdb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
+5
-6
No files found.
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
View file @
7af75b2e
...
...
@@ -39,6 +39,7 @@ auto nary_nonstandard(argument result, Arguments... args)
inline
auto
binary_broadcast
(
argument
result
,
argument
arg1
,
argument
arg2
)
{
return
[
=
](
auto
f
)
{
// const auto& output_shape = result.get_shape();
const
auto
&
b_shape
=
arg2
.
get_shape
();
auto
bdim
=
std
::
distance
(
b_shape
.
strides
().
begin
(),
std
::
find_if
(
b_shape
.
strides
().
begin
(),
...
...
@@ -63,13 +64,11 @@ inline auto binary_broadcast(argument result, argument arg1, argument arg2)
buffer
[
i
]
=
yp
[
i
];
}
__syncthreads
();
for
(
size_t
i
=
idx
.
lo
c
al
;
i
<
bdim_le
n
;
i
+=
nlo
c
al
)
for
(
size_t
i
=
idx
.
g
lo
b
al
;
i
<
n
;
i
+=
n
g
lo
b
al
)
{
auto
b
=
buffer
[
i
];
for
(
size_t
j
=
idx
.
global
;
j
<
n
;
j
+=
nglobal
)
{
outp
[
j
]
=
f
(
xp
[
j
],
b
);
}
auto
bidx
=
i
%
bdim_len
;
auto
b
=
buffer
[
bidx
];
outp
[
i
]
=
f
(
xp
[
i
],
b
);
}
});
});
...
...
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