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

Function TEST_CASE

test/fuse_reduce.cpp:41–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41TEST_CASE(single)
42{
43 migraphx::shape s{migraphx::shape::float_type, {2, 3}};
44 migraphx::program p1;
45 {
46 auto* mm = p1.get_main_module();
47 auto x = mm->add_parameter("x", s);
48 auto y = mm->add_parameter("y", s);
49 auto rsum1 = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {1}}}), x);
50 auto rsum2 = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {1}}}), y);
51 mm->add_return({rsum1, rsum2});
52 }
53 run_pass(p1);
54 migraphx::program p2;
55 {
56 auto* mm = p2.get_main_module();
57 auto x = mm->add_parameter("x", s);
58 auto y = mm->add_parameter("y", s);
59 auto rsum1 = add_reduce(p2, "main:reduce_sum0", {x}, {1}, single_reduce("reduce_sum"));
60 auto rsum2 = add_reduce(p2, "main:reduce_sum1", {y}, {1}, single_reduce("reduce_sum"));
61 mm->add_return({rsum1, rsum2});
62 }
63 EXPECT(p1 == p2);
64}
65
66TEST_CASE(pointwise_reduce)
67{

Callers

nothing calls this directly

Calls 15

add_reduceFunction · 0.85
single_reduceFunction · 0.85
add_pointwiseFunction · 0.85
single_pointwiseFunction · 0.85
get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
lensMethod · 0.80
set_bypassMethod · 0.80
run_passFunction · 0.70
make_opFunction · 0.50
literalClass · 0.50
add_instructionMethod · 0.45

Tested by

no test coverage detected