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

Function create_program

test/serialize_program.cpp:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <cstdio>
31
32static migraphx::program create_program()
33{
34 migraphx::program p;
35 auto* mm = p.get_main_module();
36
37 auto x = mm->add_parameter("x", {migraphx::shape::int32_type});
38 auto two = mm->add_literal(2);
39 auto add = mm->add_instruction(migraphx::make_op("add"), x, two);
40 mm->add_return({add});
41 return p;
42}
43
44TEST_CASE(as_value)
45{

Callers 1

TEST_CASEFunction · 0.70

Calls 6

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

Tested by

no test coverage detected