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

Function TEST_CASE

test/eliminate_common_subexpression_test.cpp:44–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44TEST_CASE(cse_test1)
45{
46 migraphx::module m1;
47 {
48 auto one = m1.add_literal(1);
49 auto two = m1.add_literal(2);
50 auto sum1 = m1.add_instruction(migraphx::make_op("add"), one, two);
51 auto sum2 = m1.add_instruction(migraphx::make_op("add"), one, two);
52 auto sum3 = m1.add_instruction(migraphx::make_op("add"), sum1, sum2);
53 m1.add_instruction(pass_op{}, sum3);
54 }
55 run_pass(m1);
56
57 migraphx::module m2;
58 {
59 auto one = m2.add_literal(1);
60 auto two = m2.add_literal(2);
61 auto sum1 = m2.add_instruction(migraphx::make_op("add"), one, two);
62 auto sum3 = m2.add_instruction(migraphx::make_op("add"), sum1, sum1);
63 m2.add_instruction(pass_op{}, sum3);
64 }
65 EXPECT(m1 == m2);
66}
67
68TEST_CASE(cse_test2)
69{

Callers

nothing calls this directly

Calls 10

get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
run_passFunction · 0.70
make_opFunction · 0.50
literalClass · 0.50
create_programFunction · 0.50
add_literalMethod · 0.45
add_instructionMethod · 0.45
create_moduleMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected