| 51 | namespace |
| 52 | { |
| 53 | Status validate_arguments(const ITensorInfo *src, |
| 54 | const ITensorInfo *dst, |
| 55 | const Size2D &convolved_dims, |
| 56 | unsigned int num_groups) |
| 57 | { |
| 58 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(src, dst); |
| 59 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(src); |
| 60 | ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(src); |
| 61 | ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(src, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, |
| 62 | DataType::F16, DataType::F32); |
| 63 | |
| 64 | const TensorShape output_shape = compute_col2im_shape(*src, convolved_dims, true, num_groups); |
| 65 | |
| 66 | // Checks performed when output is configured |
| 67 | if (dst->total_size() != 0) |
| 68 | { |
| 69 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(dst); |
| 70 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(dst->tensor_shape(), output_shape); |
| 71 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, dst); |
| 72 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_QUANTIZATION_INFO(src, dst); |
| 73 | ARM_COMPUTE_RETURN_ERROR_ON_MSG(dst->data_layout() != DataLayout::NCHW, |
| 74 | "Col2Im output's data layout must always be NCHW"); |
| 75 | } |
| 76 | else |
| 77 | { |
| 78 | const TensorInfo dst_info(output_shape, src->num_channels(), src->data_type()); |
| 79 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(&dst_info); |
| 80 | } |
| 81 | |
| 82 | return Status{}; |
| 83 | } |
| 84 | |
| 85 | std::pair<Status, Window> |
| 86 | validate_and_configure_window(ITensorInfo *src, ITensorInfo *dst, const Size2D &convolved_dims, unsigned int num_groups) |
no test coverage detected