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

Function run_gpu

test/gpu/mlir.cpp:123–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static migraphx::argument run_gpu(migraphx::program p, const migraphx::parameter_map& inputs)
124{
125 mlir_gpu_target t;
126 p.compile(t);
127 migraphx::parameter_map m;
128 for(auto&& input : inputs)
129 {
130 m[input.first] = t.copy_to(input.second);
131 }
132 for(auto&& x : p.get_parameter_shapes())
133 {
134 if(m.count(x.first) == 0)
135 {
136 m[x.first] = t.allocate(x.second);
137 }
138 }
139 return t.copy_from(p.eval(m).front());
140}
141
142static migraphx::argument run_ref(migraphx::program p, const migraphx::parameter_map& inputs)
143{

Callers 1

verify_mlirFunction · 0.85

Calls 7

frontMethod · 0.80
compileMethod · 0.45
copy_toMethod · 0.45
get_parameter_shapesMethod · 0.45
allocateMethod · 0.45
copy_fromMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected