aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLFFTDigitReverseKernel.cpp
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2020-12-10 16:49:39 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2020-12-14 13:58:17 +0000
commitea7de7babc319e2fa31c5e1c986e48d6c5370689 (patch)
tree2303791668c67eda76dfb14d07b912af1cb54a17 /src/core/CL/kernels/CLFFTDigitReverseKernel.cpp
parentec241b48ea7481e797285788fd68e5e1d42382bb (diff)
downloadComputeLibrary-ea7de7babc319e2fa31c5e1c986e48d6c5370689.tar.gz
Enable FFT for FP16
Resolves: COMPMID-4051 Change-Id: I0c0bf97212dd281c19d5081e6247e7dc0c23cd6b Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4687 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLFFTDigitReverseKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLFFTDigitReverseKernel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/CL/kernels/CLFFTDigitReverseKernel.cpp b/src/core/CL/kernels/CLFFTDigitReverseKernel.cpp
index 922e50aa73..448f5a9c1e 100644
--- a/src/core/CL/kernels/CLFFTDigitReverseKernel.cpp
+++ b/src/core/CL/kernels/CLFFTDigitReverseKernel.cpp
@@ -38,7 +38,7 @@ namespace
Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *idx, const FFTDigitReverseKernelInfo &config)
{
ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(input);
- ARM_COMPUTE_RETURN_ERROR_ON(input->data_type() != DataType::F32);
+ ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN(input, DataType::F16, DataType::F32);
ARM_COMPUTE_RETURN_ERROR_ON(input->num_channels() != 1 && input->num_channels() != 2);
ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(idx, 1, DataType::U32);
ARM_COMPUTE_RETURN_ERROR_ON(std::set<unsigned int>({ 0, 1 }).count(config.axis) == 0);
@@ -90,6 +90,7 @@ void CLFFTDigitReverseKernel::configure(const CLCompileContext &compile_context,
// Create kernel
CLBuildOptions build_opts;
build_opts.add_option("-DVEC_SIZE=" + support::cpp11::to_string(input->info()->num_channels()));
+ build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type()));
build_opts.add_option_if(config.conjugate, "-DCONJ");
std::string kernel_name = "fft_digit_reverse_axis_" + support::cpp11::to_string(config.axis);
_kernel = create_kernel(compile_context, kernel_name, build_opts.options());