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

Function test_reduce_ops_variable_axes

test/op_shape_test.cpp:3181–3196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3179}
3180
3181static void test_reduce_ops_variable_axes(const std::string& name)
3182{
3183 {
3184 migraphx::shape input_shape{migraphx::shape::float_type, {2, 3, 4}};
3185 migraphx::shape axes_shape{migraphx::shape::int64_type, {1}};
3186 migraphx::shape expected_shape{migraphx::shape::float_type, {{1, 2}, {1, 3}, {1, 4}}};
3187 expect_shape(expected_shape, migraphx::make_op(name), input_shape, axes_shape);
3188 }
3189
3190 {
3191 migraphx::shape input_shape{migraphx::shape::float_type, {{2, 3}, {3, 4}}};
3192 migraphx::shape axes_shape{migraphx::shape::int64_type, {1}};
3193 migraphx::shape expected_shape{migraphx::shape::float_type, {{1, 3}, {1, 4}}};
3194 expect_shape(expected_shape, migraphx::make_op(name), input_shape, axes_shape);
3195 }
3196}
3197
3198TEST_CASE(reduce_max) { test_reduce_ops("reduce_max"); }
3199TEST_CASE(reduce_min) { test_reduce_ops("reduce_min"); }

Callers 1

TEST_CASEFunction · 0.85

Calls 2

expect_shapeFunction · 0.85
make_opFunction · 0.50

Tested by

no test coverage detected