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
6b6a7e80
Commit
6b6a7e80
authored
Jun 06, 2022
by
charlie
Browse files
Code cleanup
parent
343483a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
5 deletions
+1
-5
src/instruction.cpp
src/instruction.cpp
+0
-1
src/program.cpp
src/program.cpp
+0
-2
test/module_test.cpp
test/module_test.cpp
+1
-2
No files found.
src/instruction.cpp
View file @
6b6a7e80
...
...
@@ -77,7 +77,6 @@ bool operator==(const instruction& i, instruction_ref ref)
bool
instruction
::
valid
(
const
module
&
m
,
bool
check_order
)
const
{
return
valid
()
&&
std
::
all_of
(
arguments
.
begin
(),
arguments
.
end
(),
[
&
](
instruction_ref
i
)
{
(
*
i
).
debug_print
();
auto
self
=
std
::
find
(
i
->
outputs
().
begin
(),
i
->
outputs
().
end
(),
*
this
);
bool
ret
=
self
!=
i
->
outputs
().
end
();
if
(
check_order
)
...
...
src/program.cpp
View file @
6b6a7e80
...
...
@@ -154,8 +154,6 @@ void program::compile(const target& t, compile_options options)
auto
mods
=
this
->
get_modules
();
std
::
cout
<<
"mods size: "
<<
mods
.
size
()
<<
std
::
endl
;
// Validate and finalize
for
(
const
auto
&
mod
:
reverse
(
mods
))
{
...
...
test/module_test.cpp
View file @
6b6a7e80
...
...
@@ -7,7 +7,6 @@
#include <sstream>
#include "test.hpp"
#include <migraphx/make_op.hpp>
#include <migraphx/verify.hpp>
#include <basic_ops.hpp>
...
...
@@ -320,7 +319,7 @@ TEST_CASE(multiple_module_dependency)
auto
*
mm
=
p
.
get_main_module
();
auto
*
sub
=
p
.
create_module
(
"sub"
);
auto
l1
=
mm
->
add_literal
(
migraphx
::
literal
(
3
));
// second same literal to make sure instruction_ref is being compared, ra
h
ter than the
// second same literal to make sure instruction_ref is being compared, rat
h
er than the
// instructions
sub
->
add_literal
(
migraphx
::
literal
(
3
));
sub
->
add_instruction
(
sum_op
{},
l1
,
l1
);
...
...
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