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

Method print_cpp

src/program.cpp:1163–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1161}
1162
1163void program::print_cpp(std::ostream& os) const
1164{
1165 auto vec_modules = this->get_modules();
1166 std::unordered_map<instruction_ref, std::string> names;
1167 os << "migraphx::program p;\n";
1168 for(auto& mod : vec_modules)
1169 {
1170 std::string var_name = "m" + mod->name();
1171 os << "migraphx::module_ref " << var_name << " = ";
1172 if(mod->name() == "main")
1173 os << "p.get_main_module();";
1174 else
1175 os << "p.create_module(\"" << mod->name() << "\");";
1176 os << std::endl;
1177 names = mod->print_cpp(os, var_name, names);
1178 os << std::endl;
1179 }
1180}
1181
1182void program::dry_run(const parameter_map& params) const
1183{

Callers

nothing calls this directly

Calls 2

get_modulesMethod · 0.95
nameMethod · 0.45

Tested by

no test coverage detected