| 3114 | } |
| 3115 | |
| 3116 | static void test_reduce_ops(const std::string& name) |
| 3117 | { |
| 3118 | { |
| 3119 | migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; |
| 3120 | expect_shape(migraphx::shape{migraphx::shape::float_type, {1, 1, 1, 1}}, |
| 3121 | migraphx::make_op(name, {{"axes", {0, 1, 2, 3}}}), |
| 3122 | input); |
| 3123 | } |
| 3124 | { |
| 3125 | migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; |
| 3126 | expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 1, 1}}, |
| 3127 | migraphx::make_op(name, {{"axes", {2, 3}}}), |
| 3128 | input); |
| 3129 | } |
| 3130 | { |
| 3131 | migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; |
| 3132 | expect_shape(migraphx::shape{migraphx::shape::float_type, {1, 3, 4, 5}}, |
| 3133 | migraphx::make_op(name, {{"axes", {0}}}), |
| 3134 | input); |
| 3135 | } |
| 3136 | { |
| 3137 | migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; |
| 3138 | expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 1}}, |
| 3139 | migraphx::make_op(name, {{"axes", {-1}}}), |
| 3140 | input); |
| 3141 | } |
| 3142 | { |
| 3143 | migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; |
| 3144 | throws_shape(migraphx::make_op(name, {{"axes", {4}}}), input); |
| 3145 | } |
| 3146 | } |
| 3147 | |
| 3148 | // dynamic shape |
| 3149 | static void test_dyn_reduce_ops(const std::string& name) |
no test coverage detected