diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2023-05-05 15:02:32 +0100 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2023-06-06 13:36:13 +0000 |
commit | 48c0ed9d6298dfcc2bf37ac85c168fc7d41ee803 (patch) | |
tree | 13b4338bb175a759e03a3cbe88ceb755d4a6a8cd /src/gpu/cl | |
parent | 74921eee924625426429044decefe3673561b174 (diff) | |
download | ComputeLibrary-48c0ed9d6298dfcc2bf37ac85c168fc7d41ee803.tar.gz |
Fix ScaleKernel validate method.
* Validate returns an error if the number of channels of the input tensor is
not 1. With this change we generate an error if scale is called with any of
these formats:
Format::UV88, Format::RGB888, Format::RGBA8888,Format::YUV444,
Format::YUYV422, Format::NV12, Format::NV21,Format::IYUV,
Format::UYVY422
* Resolves ARMCL-631
Change-Id: If9d8b9d95332994920def55d8faae9dbf4213f79
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9579
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl')
-rw-r--r-- | src/gpu/cl/kernels/ClScaleKernel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/cl/kernels/ClScaleKernel.cpp b/src/gpu/cl/kernels/ClScaleKernel.cpp index 910287194e..d31c387ee5 100644 --- a/src/gpu/cl/kernels/ClScaleKernel.cpp +++ b/src/gpu/cl/kernels/ClScaleKernel.cpp @@ -64,6 +64,7 @@ Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst, const ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, dst); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_QUANTIZATION_INFO(src, dst); ARM_COMPUTE_RETURN_ERROR_ON(dst == src); + ARM_COMPUTE_RETURN_ERROR_ON(src->num_channels()!=1); ARM_COMPUTE_RETURN_ERROR_ON(info.align_corners && !arm_compute::scale_utils::is_align_corners_allowed_sampling_policy(info.sampling_policy)); ARM_COMPUTE_RETURN_ERROR_ON(is_data_type_quantized(src->data_type()) && !is_data_type_quantized_asymmetric(src->data_type())); |