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
cfbdef6b
Commit
cfbdef6b
authored
Apr 02, 2019
by
Paul
Browse files
Formatting
parent
e145f958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/constant_propagate.cpp
src/constant_propagate.cpp
+4
-4
No files found.
src/constant_propagate.cpp
View file @
cfbdef6b
...
@@ -25,13 +25,13 @@ struct match_const_add
...
@@ -25,13 +25,13 @@ struct match_const_add
}
}
};
};
void
constant_propagate
::
apply
(
program
&
p
)
const
void
constant_propagate
::
apply
(
program
&
p
)
const
{
{
fix
([
&
](
auto
self
,
auto
ins
)
{
fix
([
&
](
auto
self
,
auto
ins
)
{
if
(
not
ins
->
get_shape
().
broadcasted
()
and
ins
->
name
()
!=
"@literal"
)
if
(
not
ins
->
get_shape
().
broadcasted
()
and
ins
->
name
()
!=
"@literal"
)
{
{
auto
r
=
ins
->
eval
();
auto
r
=
ins
->
eval
();
if
(
not
r
.
empty
())
if
(
not
r
.
empty
())
{
{
auto
l
=
p
.
add_literal
(
r
.
get_shape
(),
r
.
data
());
auto
l
=
p
.
add_literal
(
r
.
get_shape
(),
r
.
data
());
p
.
replace_instruction
(
ins
,
l
);
p
.
replace_instruction
(
ins
,
l
);
...
@@ -39,7 +39,7 @@ void constant_propagate::apply(program& p) const
...
@@ -39,7 +39,7 @@ void constant_propagate::apply(program& p) const
}
}
}
}
auto
children
=
ins
->
inputs
();
auto
children
=
ins
->
inputs
();
for
(
auto
child
:
children
)
for
(
auto
child
:
children
)
self
(
child
);
self
(
child
);
})(
std
::
prev
(
p
.
end
()));
})(
std
::
prev
(
p
.
end
()));
}
}
...
...
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