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

Function TEST_CASE

test/fuse_pointwise.cpp:41–68  ·  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 z = mm->add_parameter("z", s);
50 auto add1 = mm->add_instruction(migraphx::make_op("add"), x, y);
51 auto pass = mm->add_instruction(pass_op{}, add1);
52 auto add2 = mm->add_instruction(migraphx::make_op("add"), pass, z);
53 mm->add_return({add2});
54 }
55 run_pass(p1);
56 migraphx::program p2;
57 {
58 auto* mm = p2.get_main_module();
59 auto x = mm->add_parameter("x", s);
60 auto y = mm->add_parameter("y", s);
61 auto z = mm->add_parameter("z", s);
62 auto add1 = add_pointwise(p2, "main:pointwise0", {x, y}, single_pointwise("add"));
63 auto pass = mm->add_instruction(pass_op{}, add1);
64 auto add2 = add_pointwise(p2, "main:pointwise1", {pass, z}, single_pointwise("add"));
65 mm->add_return({add2});
66 }
67 EXPECT(p1 == p2);
68}
69
70TEST_CASE(double_add)
71{

Callers

nothing calls this directly

Calls 15

add_pointwiseFunction · 0.85
single_pointwiseFunction · 0.85
get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
lensMethod · 0.80
scalarMethod · 0.80
frontMethod · 0.80
run_passFunction · 0.70
make_opFunction · 0.50
literalClass · 0.50
add_instructionMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected