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

Function TEST_CASE

test/split_reduce.cpp:56–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56TEST_CASE(single)
57{
58 migraphx::shape s{migraphx::shape::float_type, {2, 3, 327680}};
59 migraphx::program p1;
60 {
61 auto* mm = p1.get_main_module();
62 auto x = mm->add_parameter("x", s);
63 auto rsum = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {2}}}), x);
64 mm->add_return({rsum});
65 }
66 run_pass(p1);
67 migraphx::program p2;
68 {
69 auto* mm = p2.get_main_module();
70 auto x = mm->add_parameter("x", s);
71 auto rsum = add_reduce(
72 p2, "main:reduce_sum0_split", {x}, {2}, "assign_add", single_reduce("reduce_sum"));
73 mm->add_return({rsum});
74 }
75 EXPECT(p1 == p2);
76}
77
78TEST_CASE(fused)
79{

Callers

nothing calls this directly

Calls 14

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

Tested by

no test coverage detected