| 40 | } |
| 41 | |
| 42 | static migraphx::instruction_ref |
| 43 | create_im2col(migraphx::instruction_ref& l_img, size_t channels, migraphx::module& m) |
| 44 | { |
| 45 | size_t f[2] = {1, 1}; |
| 46 | std::vector<int32_t> weights(channels * f[0] * f[1]); |
| 47 | migraphx::shape s_weights{migraphx::shape::int32_type, {1, channels, f[0], f[1]}}; |
| 48 | auto l_weights = m.add_literal(migraphx::literal{s_weights, weights}); |
| 49 | return m.add_instruction(migraphx::make_op("im2col"), l_img, l_weights); |
| 50 | } |
| 51 | |
| 52 | static migraphx::instruction_ref |
| 53 | create_conv(migraphx::instruction_ref& l_img, |
no test coverage detected