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
c8c6bf28
Unverified
Commit
c8c6bf28
authored
Jul 09, 2019
by
mvermeulen
Committed by
GitHub
Jul 09, 2019
Browse files
Merge pull request #313 from ROCmSoftwarePlatform/propogate-broadcast
Propagate broadcast
parents
ebfe9735
d5685340
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/propagate_constant.cpp
src/propagate_constant.cpp
+3
-3
No files found.
src/propagate_constant.cpp
View file @
c8c6bf28
...
@@ -10,8 +10,8 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -10,8 +10,8 @@ inline namespace MIGRAPHX_INLINE_NS {
bool
skip_propogate
(
instruction_ref
ins
)
bool
skip_propogate
(
instruction_ref
ins
)
{
{
if
(
ins
->
name
()
==
"
@literal
"
)
if
(
ins
->
name
()
==
"
contiguous
"
)
return
true
;
return
skip_propogate
(
ins
->
inputs
().
front
())
;
auto
&&
s
=
ins
->
get_shape
();
auto
&&
s
=
ins
->
get_shape
();
if
(
s
.
broadcasted
()
and
not
s
.
scalar
())
if
(
s
.
broadcasted
()
and
not
s
.
scalar
())
return
true
;
return
true
;
...
@@ -33,7 +33,7 @@ void propagate_constant::apply(program& p) const
...
@@ -33,7 +33,7 @@ void propagate_constant::apply(program& p) const
ins
->
outputs
().
end
());
ins
->
outputs
().
end
());
for
(
auto
child
:
children
)
for
(
auto
child
:
children
)
{
{
if
(
skip_propogate
(
child
))
if
(
child
->
name
()
==
"@literal"
or
skip_propogate
(
child
))
{
{
self
(
child
);
self
(
child
);
continue
;
continue
;
...
...
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