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

Function TEST_CASE

test/dead_code_elimination_test.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38TEST_CASE(simple_test)
39{
40 migraphx::program p;
41 auto* mm = p.get_main_module();
42 auto one = mm->add_literal(1);
43 auto two = mm->add_literal(2);
44 mm->add_instruction(migraphx::make_op("add"), one, two);
45 auto count = std::distance(mm->begin(), mm->end());
46 run_pass(p);
47 EXPECT(std::distance(mm->begin(), mm->end()) == count);
48 auto result = p.eval({}).back();
49 EXPECT(result == migraphx::literal{3});
50 EXPECT(result != migraphx::literal{4});
51}
52
53TEST_CASE(simple_test_nop)
54{

Callers

nothing calls this directly

Calls 15

distanceFunction · 0.85
containsFunction · 0.85
get_main_moduleMethod · 0.80
backMethod · 0.80
add_parameterMethod · 0.80
atMethod · 0.80
get_modulesMethod · 0.80
run_passFunction · 0.70
make_opFunction · 0.50
none_ofFunction · 0.50
create_programFunction · 0.50
add_literalMethod · 0.45

Tested by

no test coverage detected