Commit de001f3e authored by Khalique's avatar Khalique
Browse files

formatting

parent fd150551
...@@ -25,7 +25,9 @@ TEST_CASE(simple_test) ...@@ -25,7 +25,9 @@ TEST_CASE(simple_test)
auto two_identity = p.add_instruction(migraphx::op::identity{}, two); auto two_identity = p.add_instruction(migraphx::op::identity{}, two);
p.add_instruction(sum_op{}, one_identity, two_identity); p.add_instruction(sum_op{}, one_identity, two_identity);
p.compile(eliminate_identity_target{}); p.compile(eliminate_identity_target{});
EXPECT(std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins){ return ins.name() == "identity"; })); EXPECT(std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins) {
return ins.name() == "identity";
}));
auto result = p.eval({}); auto result = p.eval({});
EXPECT(result == migraphx::literal{3}); EXPECT(result == migraphx::literal{3});
} }
...@@ -39,7 +41,9 @@ TEST_CASE(simple_test_end) ...@@ -39,7 +41,9 @@ TEST_CASE(simple_test_end)
auto ans = p.add_instruction(sum_op{}, one, two); auto ans = p.add_instruction(sum_op{}, one, two);
p.add_instruction(migraphx::op::identity{}, ans); p.add_instruction(migraphx::op::identity{}, ans);
p.compile(eliminate_identity_target{}); p.compile(eliminate_identity_target{});
EXPECT(std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins){ return ins.name() == "identity"; })); EXPECT(std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins) {
return ins.name() == "identity";
}));
auto result = p.eval({}); auto result = p.eval({});
EXPECT(result == migraphx::literal{3}); EXPECT(result == migraphx::literal{3});
} }
...@@ -55,10 +59,11 @@ TEST_CASE(simple_test_end_dependency) ...@@ -55,10 +59,11 @@ TEST_CASE(simple_test_end_dependency)
p.add_instruction(sum_op{}, ans, three); p.add_instruction(sum_op{}, ans, three);
p.add_instruction(migraphx::op::identity{}, ans); p.add_instruction(migraphx::op::identity{}, ans);
p.compile(eliminate_identity_target{}); p.compile(eliminate_identity_target{});
EXPECT(!std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins){ return ins.name() == "identity"; })); EXPECT(!std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins) {
return ins.name() == "identity";
}));
auto result = p.eval({}); auto result = p.eval({});
EXPECT(result == migraphx::literal{3.0}); EXPECT(result == migraphx::literal{3.0});
} }
int main(int argc, const char* argv[]) { test::run(argc, argv); } int main(int argc, const char* argv[]) { test::run(argc, argv); }
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