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

Function create_mlir_submodule

test/gpu/mlir.cpp:75–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static migraphx::module create_mlir_submodule(const migraphx::module& mmlir)
76{
77 migraphx::module m;
78 std::unordered_map<migraphx::instruction_ref, migraphx::instruction_ref> map_ins;
79 auto params = mmlir.get_parameter_names();
80 for(const auto& name : params)
81 {
82 auto param = mmlir.get_parameter(name);
83 map_ins[param] = m.add_parameter(name, param->get_shape().as_standard());
84 }
85 auto y = m.add_instructions(&mmlir, &map_ins);
86 m.add_return(y);
87 return m;
88}
89
90static migraphx::program create_program_from_mlir(const migraphx::module& mmlir)
91{

Callers 1

create_program_from_mlirFunction · 0.85

Calls 7

add_parameterMethod · 0.80
as_standardMethod · 0.80
add_instructionsMethod · 0.80
get_parameter_namesMethod · 0.45
get_parameterMethod · 0.45
get_shapeMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected