| 62 | } |
| 63 | |
| 64 | virtual migraphx::shape compute_shape(migraphx::shapes inputs) const override |
| 65 | { |
| 66 | if(not inputs[0].standard() or not inputs[1].standard()) |
| 67 | { |
| 68 | throw std::runtime_error("Input args must be standard shaped"); |
| 69 | } |
| 70 | if(inputs.size() != 2) |
| 71 | { |
| 72 | throw std::runtime_error("number of inputs must be 2"); |
| 73 | } |
| 74 | return inputs.back(); |
| 75 | } |
| 76 | }; |
| 77 | |
| 78 | struct half_copy_device final : migraphx::experimental_custom_op_base |