| 121 | } |
| 122 | |
| 123 | static 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 | |
| 142 | static migraphx::argument run_ref(migraphx::program p, const migraphx::parameter_map& inputs) |
| 143 | { |
no test coverage detected