Commit 3b46ba9d authored by Shucai Xiao's avatar Shucai Xiao
Browse files

add a unit test for more code coverage

parent 2c9e7905
...@@ -161,6 +161,19 @@ TEST_CASE(standard_flatten_op) ...@@ -161,6 +161,19 @@ TEST_CASE(standard_flatten_op)
EXPECT(std::distance(m.begin(), m.end()) == (count - 1)); EXPECT(std::distance(m.begin(), m.end()) == (count - 1));
} }
TEST_CASE(standard_return_input)
{
migraphx::module m;
auto l = m.add_literal(get_2x2());
auto tl = m.add_instruction(migraphx::make_op("add"), l, l);
auto c = m.add_instruction(migraphx::make_op("contiguous"), tl);
m.add_return({c});
auto count = std::distance(m.begin(), m.end());
run_pass(m);
EXPECT(std::distance(m.begin(), m.end()) == count - 1);
}
TEST_CASE(contiguous_pointwise) TEST_CASE(contiguous_pointwise)
{ {
migraphx::shape s{migraphx::shape::float_type, {2, 3, 8, 8}}; migraphx::shape s{migraphx::shape::float_type, {2, 3, 8, 8}};
......
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