Commit d229d3e1 authored by charlie's avatar charlie
Browse files

add neg axes test

parent 9e63a740
...@@ -1990,6 +1990,17 @@ TEST_CASE(test_squeeze_dyn) ...@@ -1990,6 +1990,17 @@ TEST_CASE(test_squeeze_dyn)
throws_shape(migraphx::make_op("squeeze", {{"axes", {0}}}), s1); throws_shape(migraphx::make_op("squeeze", {{"axes", {0}}}), s1);
} }
TEST_CASE(test_squeeze_dyn_neg_axes)
{
migraphx::shape s1{migraphx::shape::float_type,
{{1, 4, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}}};
migraphx::shape s2{migraphx::shape::float_type, {{1, 4, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}}};
expect_shape(s2, migraphx::make_op("squeeze", {{"axes", {-2}}}), s1);
migraphx::shape s3{migraphx::shape::float_type, {{1, 4, 0}, {3, 3, 0}, {3, 3, 0}}};
expect_shape(s3, migraphx::make_op("squeeze", {{"axes", {-2, -4}}}), s1);
}
TEST_CASE(test_squeeze_transpose) TEST_CASE(test_squeeze_transpose)
{ {
migraphx::shape s1{migraphx::shape::float_type, {4, 4, 1}, {4, 1, 4}}; migraphx::shape s1{migraphx::shape::float_type, {4, 4, 1}, {4, 1, 4}};
......
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