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

Function create_program

test/fpga/test_compile.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <migraphx/target_assignments.hpp>
31
32static migraphx::program create_program()
33{
34 migraphx::program p;
35 auto* mm = p.get_main_module();
36 migraphx::shape s{migraphx::shape::float_type, {3}};
37 auto x = mm->add_parameter("x", s);
38 auto y = mm->add_parameter("y", s);
39 auto z = mm->add_parameter("z", s);
40 auto sum = mm->add_instruction(migraphx::make_op("add"), x, y);
41 auto sum_2 = mm->add_instruction(migraphx::make_op("add"), sum, z);
42 mm->add_return({sum_2});
43 return p;
44}
45
46TEST_CASE(compile)
47{

Callers 1

TEST_CASEFunction · 0.70

Calls 5

get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
make_opFunction · 0.50
add_instructionMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected