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

Function run_prog

test/run_loop_test.cpp:203–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201};
202
203static auto run_prog(migraphx::program p, int64_t iter_num, bool cond, int64_t ini_val)
204{
205 migraphx::shape si{migraphx::shape::int64_type};
206 migraphx::shape s{migraphx::shape::int64_type, {1}};
207 migraphx::shape sc{migraphx::shape::bool_type};
208
209 p.compile(migraphx::make_target("ref"));
210 migraphx::parameter_map pp;
211 pp["iter_num"] = migraphx::argument(si, &iter_num);
212 pp["ccond"] = migraphx::argument(sc, &cond);
213 pp["val"] = migraphx::argument(s, &ini_val);
214 auto rets = p.eval(pp);
215
216 std::vector<std::vector<int64_t>> res;
217 for(auto& arg : rets)
218 {
219 std::vector<int64_t> vec;
220 arg.visit([&](auto v) { vec.assign(v.begin(), v.end()); });
221 res.push_back(vec);
222 }
223
224 return res;
225}
226
227TEST_CASE(loop_test1)
228{

Callers 1

TEST_CASEFunction · 0.70

Calls 9

make_targetFunction · 0.85
argumentClass · 0.50
compileMethod · 0.45
evalMethod · 0.45
visitMethod · 0.45
assignMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected