| 73 | } |
| 74 | |
| 75 | static migraphx::module create_mlir_submodule(const migraphx::module& mmlir) |
| 76 | { |
| 77 | migraphx::module m; |
| 78 | std::unordered_map<migraphx::instruction_ref, migraphx::instruction_ref> map_ins; |
| 79 | auto params = mmlir.get_parameter_names(); |
| 80 | for(const auto& name : params) |
| 81 | { |
| 82 | auto param = mmlir.get_parameter(name); |
| 83 | map_ins[param] = m.add_parameter(name, param->get_shape().as_standard()); |
| 84 | } |
| 85 | auto y = m.add_instructions(&mmlir, &map_ins); |
| 86 | m.add_return(y); |
| 87 | return m; |
| 88 | } |
| 89 | |
| 90 | static migraphx::program create_program_from_mlir(const migraphx::module& mmlir) |
| 91 | { |
no test coverage detected