| 62 | } |
| 63 | |
| 64 | Status ClSoftmaxKernel::validate(const ITensorInfo &src, const ITensorInfo &dst, const SoftmaxKernelInfo &info) |
| 65 | { |
| 66 | ARM_COMPUTE_UNUSED(src, dst, info); |
| 67 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(&src, &dst); |
| 68 | |
| 69 | ARM_COMPUTE_RETURN_ERROR_ON(src.num_dimensions() > 4); |
| 70 | |
| 71 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(&src, &dst); |
| 72 | |
| 73 | ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN( // |
| 74 | &src, DataType::F32, DataType::F16, DataType::QASYMM8, DataType::QASYMM8_SIGNED); |
| 75 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(&src, &dst); |
| 76 | |
| 77 | ARM_COMPUTE_RETURN_ERROR_ON(info.input_data_type != src.data_type()); |
| 78 | ARM_COMPUTE_RETURN_ERROR_ON(info.axis < static_cast<int32_t>(-src.num_dimensions()) || |
| 79 | static_cast<int32_t>(src.num_dimensions()) <= info.axis); |
| 80 | |
| 81 | if (is_data_type_quantized_asymmetric(src.data_type())) |
| 82 | { |
| 83 | ARM_COMPUTE_RETURN_ERROR_ON(src.quantization_info().uniform().scale < 0); |
| 84 | |
| 85 | ARM_COMPUTE_RETURN_ERROR_ON(dst.quantization_info() != |
| 86 | get_softmax_output_quantization_info(src.data_type(), info.is_log)); |
| 87 | } |
| 88 | |
| 89 | return Status{}; |
| 90 | } |
| 91 | |
| 92 | void ClSoftmaxKernel::configure(const CLCompileContext &compile_context, |
| 93 | const ITensorInfo &src, |
nothing calls this directly
no test coverage detected