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
47ca6522
"git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "cfee9b6e8b8af388ddee2a8de539206ac7b2ecc5"
Commit
47ca6522
authored
May 01, 2019
by
Paul
Browse files
Reduce nesting
parent
ac031de5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/propagate_constant.cpp
src/propagate_constant.cpp
+8
-10
No files found.
src/propagate_constant.cpp
View file @
47ca6522
...
@@ -33,19 +33,17 @@ void propagate_constant::apply(program& p) const
...
@@ -33,19 +33,17 @@ void propagate_constant::apply(program& p) const
ins
->
outputs
().
end
());
ins
->
outputs
().
end
());
for
(
auto
child
:
children
)
for
(
auto
child
:
children
)
{
{
if
(
not
skip_propogate
(
child
))
if
(
skip_propogate
(
child
))
{
{
auto
r
=
child
->
eval
();
self
(
child
);
if
(
not
r
.
empty
())
continue
;
{
assert
(
r
.
get_shape
()
==
child
->
get_shape
());
auto
l
=
p
.
add_literal
(
r
.
get_shape
(),
r
.
data
());
self
(
p
.
replace_instruction
(
child
,
l
));
}
}
}
else
auto
r
=
child
->
eval
();
if
(
not
r
.
empty
())
{
{
self
(
child
);
assert
(
r
.
get_shape
()
==
child
->
get_shape
());
auto
l
=
p
.
add_literal
(
r
.
get_shape
(),
r
.
data
());
self
(
p
.
replace_instruction
(
child
,
l
));
}
}
}
}
})(
i
);
})(
i
);
...
...
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