| 29 | } |
| 30 | |
| 31 | void get_inner_layout( |
| 32 | const TensorLayout& src, const TensorLayout& dst, TensorLayout& inner_src, |
| 33 | TensorLayout& inner_dst, Handle* handle, |
| 34 | WarpPerspectiveForwardImpl::Param::Format format) { |
| 35 | if ((src.dtype.enumv() == DTypeEnum::QuantizedS4 || |
| 36 | src.dtype.enumv() == DTypeEnum::Quantized4Asymm) && |
| 37 | dst.dtype.enumv() == src.dtype.enumv() && |
| 38 | format == param::WarpPerspective::Format::NCHW) { |
| 39 | auto relayout_opr = handle->create_operator<RelayoutFormat>(); |
| 40 | deduce_reformat_layout( |
| 41 | relayout_opr, src, inner_src, RelayoutFormat::Param::Mode::NCHW_NCHW64, |
| 42 | 0, 1); |
| 43 | deduce_reformat_layout( |
| 44 | relayout_opr, dst, inner_dst, RelayoutFormat::Param::Mode::NCHW_NCHW64, |
| 45 | 0, 1); |
| 46 | } else { |
| 47 | megdnn_assert(0, "not support"); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | } // namespace |
| 52 |
no test coverage detected