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

Function TEST_CASE

test/eliminate_allocation_test.cpp:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60};
61
62TEST_CASE(basic)
63{
64 migraphx::module m;
65
66 auto a1 = m.add_instruction(allocate{migraphx::shape{migraphx::shape::float_type, {8}}});
67 auto m1 = m.add_instruction(pass_op{}, a1);
68
69 auto a2 = m.add_instruction(allocate{migraphx::shape{migraphx::shape::float_type, {40}}});
70 auto m2 = m.add_instruction(pass_op{}, a2, m1);
71
72 auto a3 = m.add_instruction(allocate{migraphx::shape{migraphx::shape::float_type, {200}}});
73 m.add_instruction(pass_op{}, a3, m2);
74
75 run_pass(m);
76 EXPECT(m.get_output_shapes().back() == migraphx::shape{migraphx::shape::float_type, {200}});
77 EXPECT(m.get_parameter_shape("memory").bytes() == (8 * 4 + 40 * 4 + 200 * 4));
78}
79
80TEST_CASE(aligned)
81{

Callers

nothing calls this directly

Calls 6

backMethod · 0.80
run_passFunction · 0.70
add_instructionMethod · 0.45
get_output_shapesMethod · 0.45
bytesMethod · 0.45
get_parameter_shapeMethod · 0.45

Tested by

no test coverage detected