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

Function TEST_CASE

test/simplify_algebra_test.cpp:42–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42TEST_CASE(simplify_add1)
43{
44 migraphx::module m1;
45 {
46 auto x = m1.add_parameter("x", {migraphx::shape::int32_type, {1}});
47 auto y = m1.add_parameter("y", {migraphx::shape::int32_type, {1}});
48 auto one = m1.add_literal(1);
49 auto two = m1.add_literal(2);
50 auto sum1 = m1.add_instruction(migraphx::make_op("add"), x, one);
51 auto sum2 = m1.add_instruction(migraphx::make_op("add"), y, 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 x = m2.add_parameter("x", {migraphx::shape::int32_type, {1}});
60 auto y = m2.add_parameter("y", {migraphx::shape::int32_type, {1}});
61 auto one = m2.add_literal(1);
62 auto two = m2.add_literal(2);
63 auto sum1 = m2.add_instruction(migraphx::make_op("add"), one, two);
64 auto sum2 = m2.add_instruction(migraphx::make_op("add"), x, y);
65 auto sum3 = m2.add_instruction(migraphx::make_op("add"), sum2, sum1);
66 m2.add_instruction(pass_op{}, sum3);
67 }
68 EXPECT(m1 == m2);
69}
70
71TEST_CASE(simplify_add2)
72{

Callers

nothing calls this directly

Calls 15

generate_literalFunction · 0.85
get_2x2Function · 0.85
add_pointwiseFunction · 0.85
single_pointwiseFunction · 0.85
run_passesFunction · 0.85
test_dot_horizFunction · 0.85
create_moduleFunction · 0.85
add_parameterMethod · 0.80
frontMethod · 0.80
outputsMethod · 0.80
backMethod · 0.80
lensMethod · 0.80

Tested by

no test coverage detected