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
89f6abf3
Commit
89f6abf3
authored
Aug 11, 2018
by
Paul
Browse files
Formatting
parent
a6d98bad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/program.cpp
src/program.cpp
+1
-1
test/eval_test.cpp
test/eval_test.cpp
+3
-3
No files found.
src/program.cpp
View file @
89f6abf3
...
...
@@ -63,7 +63,7 @@ instruction_ref program::replace_instruction(instruction_ref ins, instruction_re
assert
(
has_instruction
(
rep
));
assert
(
ins
!=
rep
);
// TODO: Should it be an error if the output is empty?
if
(
ins
->
output
.
empty
())
if
(
ins
->
output
.
empty
())
{
remove_instruction
(
ins
);
return
rep
;
...
...
test/eval_test.cpp
View file @
89f6abf3
...
...
@@ -139,9 +139,9 @@ void replace_ins_test2()
{
migraph
::
program
p
;
auto
one
=
p
.
add_literal
(
1
);
auto
two
=
p
.
add_literal
(
2
);
auto
sum
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
auto
one
=
p
.
add_literal
(
1
);
auto
two
=
p
.
add_literal
(
2
);
auto
sum
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
auto
minus
=
p
.
add_instruction
(
minus_op
{},
two
,
one
);
p
.
add_instruction
(
pass_op
{},
minus
);
p
.
replace_instruction
(
two
,
sum
);
...
...
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