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

Function TEST_CASE

test/simplify_reshapes_test.cpp:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78TEST_CASE(broadcast_transpose)
79{
80 migraphx::module m1;
81 {
82 auto l = m1.add_parameter("x", {migraphx::shape::float_type, {5}});
83 auto mb =
84 m1.add_instruction(migraphx::make_op("multibroadcast", {{"out_lens", {2, 3, 5}}}), l);
85 auto t1 =
86 m1.add_instruction(migraphx::make_op("transpose", {{"permutation", {2, 0, 1}}}), mb);
87 m1.add_return({t1});
88 }
89 run_pass(m1);
90 migraphx::module m2;
91 {
92 auto l = m2.add_parameter("x", {migraphx::shape::float_type, {5}});
93 auto b = m2.add_instruction(
94 migraphx::make_op("broadcast", {{"axis", 0}, {"out_lens", {5, 2, 3}}}), l);
95 m2.add_return({b});
96 }
97
98 EXPECT(m1 == m2);
99}
100
101TEST_CASE(broadcast_transpose_opt)
102{

Callers

nothing calls this directly

Calls 15

get_2x2Function · 0.85
distanceFunction · 0.85
generate_literalFunction · 0.85
create_moduleFunction · 0.85
to_lensFunction · 0.85
add_parameterMethod · 0.80
get_main_moduleMethod · 0.80
backMethod · 0.80
lensMethod · 0.80
frontMethod · 0.80
run_passFunction · 0.70

Tested by

no test coverage detected