"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "477b02bcc2d5d345d30ccf9922df79b238a1e76e"
Commit 6b6a7e80 authored by charlie's avatar charlie
Browse files

Code cleanup

parent 343483a5
...@@ -77,7 +77,6 @@ bool operator==(const instruction& i, instruction_ref ref) ...@@ -77,7 +77,6 @@ bool operator==(const instruction& i, instruction_ref ref)
bool instruction::valid(const module& m, bool check_order) const bool instruction::valid(const module& m, bool check_order) const
{ {
return valid() && std::all_of(arguments.begin(), arguments.end(), [&](instruction_ref i) { 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); auto self = std::find(i->outputs().begin(), i->outputs().end(), *this);
bool ret = self != i->outputs().end(); bool ret = self != i->outputs().end();
if(check_order) if(check_order)
......
...@@ -154,8 +154,6 @@ void program::compile(const target& t, compile_options options) ...@@ -154,8 +154,6 @@ void program::compile(const target& t, compile_options options)
auto mods = this->get_modules(); auto mods = this->get_modules();
std::cout << "mods size: " << mods.size() << std::endl;
// Validate and finalize // Validate and finalize
for(const auto& mod : reverse(mods)) for(const auto& mod : reverse(mods))
{ {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <sstream> #include <sstream>
#include "test.hpp" #include "test.hpp"
#include <migraphx/make_op.hpp> #include <migraphx/make_op.hpp>
#include <migraphx/verify.hpp>
#include <basic_ops.hpp> #include <basic_ops.hpp>
...@@ -320,7 +319,7 @@ TEST_CASE(multiple_module_dependency) ...@@ -320,7 +319,7 @@ TEST_CASE(multiple_module_dependency)
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
auto* sub = p.create_module("sub"); auto* sub = p.create_module("sub");
auto l1 = mm->add_literal(migraphx::literal(3)); auto l1 = mm->add_literal(migraphx::literal(3));
// second same literal to make sure instruction_ref is being compared, rahter than the // second same literal to make sure instruction_ref is being compared, rather than the
// instructions // instructions
sub->add_literal(migraphx::literal(3)); sub->add_literal(migraphx::literal(3));
sub->add_instruction(sum_op{}, l1, l1); sub->add_instruction(sum_op{}, l1, l1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment