| 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 |
nothing calls this directly
no test coverage detected