MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / test_dyn_reduce_ops

Function test_dyn_reduce_ops

test/op_shape_test.cpp:3149–3179  ·  view source on GitHub ↗

dynamic shape

Source from the content-addressed store, hash-verified

3147
3148// dynamic shape
3149static void test_dyn_reduce_ops(const std::string& name)
3150{
3151 {
3152 migraphx::shape input{migraphx::shape::float_type, {{2, 3, {3}}, {2, 4, {4}}}};
3153 expect_shape(
3154 migraphx::shape{migraphx::shape::float_type,
3155 std::vector<migraphx::shape::dynamic_dimension>({{2, 3, {3}}, {1, 1}})},
3156 migraphx::make_op(name, {{"axes", {-1}}}),
3157 input);
3158 }
3159 {
3160 migraphx::shape input{migraphx::shape::float_type, {{2, 3, {3}}, {2, 4, {4}}}};
3161 expect_shape(
3162 migraphx::shape{migraphx::shape::float_type,
3163 std::vector<migraphx::shape::dynamic_dimension>({{1, 1}, {2, 4, {4}}})},
3164 migraphx::make_op(name, {{"axes", {0}}}),
3165 input);
3166 }
3167 {
3168 migraphx::shape input{migraphx::shape::float_type, {{2, 3, {3}}, {2, 4, {4}}}};
3169 expect_shape(
3170 migraphx::shape{migraphx::shape::float_type,
3171 std::vector<migraphx::shape::dynamic_dimension>({{1, 1}, {1, 1}})},
3172 migraphx::make_op(name, {{"axes", {0, 1}}}),
3173 input);
3174 }
3175 {
3176 migraphx::shape input{migraphx::shape::float_type, {{2, 3, {3}}, {2, 4, {4}}}};
3177 throws_shape(migraphx::make_op(name, {{"axes", {4}}}), input);
3178 }
3179}
3180
3181static void test_reduce_ops_variable_axes(const std::string& name)
3182{

Callers 1

TEST_CASEFunction · 0.85

Calls 3

expect_shapeFunction · 0.85
throws_shapeFunction · 0.85
make_opFunction · 0.50

Tested by

no test coverage detected