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
20bdf794
Commit
20bdf794
authored
Aug 25, 2018
by
Paul
Browse files
Formatting
parent
22cc51ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
+5
-2
No files found.
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
View file @
20bdf794
...
...
@@ -114,11 +114,14 @@ inline auto nary(argument result, argument arg1, argument arg2)
return
[
=
](
auto
f
)
{
// TODO: Check for one broadcast stride
// TODO: Check result and arg1 shape is the same
if
(
arg1
.
get_shape
().
standard
()
and
arg2
.
get_shape
().
broadcasted
()
and
std
::
count_if
(
arg2
.
get_shape
().
strides
().
begin
(),
arg2
.
get_shape
().
strides
().
end
(),
[](
auto
x
)
{
return
x
!=
0
;
})
==
1
)
if
(
arg1
.
get_shape
().
standard
()
and
arg2
.
get_shape
().
broadcasted
()
and
std
::
count_if
(
arg2
.
get_shape
().
strides
().
begin
(),
arg2
.
get_shape
().
strides
().
end
(),
[](
auto
x
)
{
return
x
!=
0
;
})
==
1
)
{
binary_broadcast
(
result
,
arg1
,
arg2
)(
f
);
}
else
else
{
nary_impl
(
result
,
arg1
,
arg2
)(
f
);
}
...
...
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