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

Function TEST_CASE

test/fuse_concat.cpp:84–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84TEST_CASE(simple_concat_pointwise)
85{
86 migraphx::shape s{migraphx::shape::float_type, {2, 3}};
87 migraphx::program p1;
88 {
89 auto* mm = p1.get_main_module();
90 auto x = mm->add_parameter("x", s);
91 auto y = mm->add_parameter("y", s);
92 auto add = add_pointwise(p1, "main:pointwise0", {x, y}, single_pointwise("add"));
93 auto sub = add_pointwise(p1, "main:pointwise1", {x, y}, single_pointwise("sub"));
94 auto concat = mm->add_instruction(migraphx::make_op("concat", {{"axis", 1}}), add, sub);
95 mm->add_return({concat});
96 }
97 run_pass(p1);
98 migraphx::program p2;
99 {
100 auto* mm = p2.get_main_module();
101 auto x = mm->add_parameter("x", s);
102 auto y = mm->add_parameter("y", s);
103 auto fused_concat =
104 add_pointwise_concat(p2,
105 1,
106 arg("noop:concat0", {}, noop_pointwise()),
107 arg("concat:main:pointwise0", {x, y}, single_pointwise("add")),
108 arg("concat:main:pointwise1", {x, y}, single_pointwise("sub")));
109 mm->add_return({fused_concat});
110 }
111 EXPECT(p1 == p2);
112}
113
114TEST_CASE(partial_pointwise_concat)
115{

Callers

nothing calls this directly

Calls 11

add_pointwiseFunction · 0.85
single_pointwiseFunction · 0.85
add_pointwise_concatFunction · 0.85
noop_pointwiseFunction · 0.85
get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
run_passFunction · 0.70
argFunction · 0.70
make_opFunction · 0.50
add_instructionMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected