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

Method get_output_params

test/run_loop_test.cpp:108–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 test_loop(int64_t iter_num) { max_iterations = iter_num; }
107
108 std::unordered_map<std::string, int> get_output_params(const migraphx::module& m) const
109 {
110 auto get_output_index = [](const std::string& name) {
111 std::string out_prefix = "#output_";
112 auto loc = name.find(out_prefix);
113 if(loc != std::string::npos)
114 {
115 return std::stoi(name.substr(loc + out_prefix.size()));
116 }
117
118 return -1;
119 };
120
121 const auto& param_names = m.get_parameter_names();
122 std::unordered_map<std::string, int> result;
123 for(const auto& name : param_names)
124 {
125 auto index = get_output_index(name);
126 if(index == -1)
127 continue;
128 result[name] = index;
129 }
130
131 return result;
132 }
133 };
134
135 migraphx::argument

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
sizeMethod · 0.45
get_parameter_namesMethod · 0.45

Tested by

no test coverage detected