aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Marquez Tello <pablo.tello@arm.com>2023-07-10 15:23:44 +0100
committerPablo Marquez Tello <pablo.tello@arm.com>2023-07-10 15:37:53 +0000
commit4c0a38a33046416a8f8fd779a467502b98311bcd (patch)
tree5c76971d52f6a85409486d8897c4584d1a05c61e
parent1d0620447883240776f2510942742b5abb712b19 (diff)
downloadComputeLibrary-4c0a38a33046416a8f8fd779a467502b98311bcd.tar.gz
Disable kernel size 3 in argminmax for axis 0
* Only kernel sizes supported are 2, 4, 8 and 16. * Resolves COMPMID-6349 Change-Id: I30c85dcb3505d47fe56a2d2a08e9221ff426ee93 Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9890 Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--docs/user_guide/errata.dox2
-rw-r--r--src/core/CL/kernels/CLArgMinMaxLayerKernel.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/user_guide/errata.dox b/docs/user_guide/errata.dox
index 78dd232c3f..d5689f40f0 100644
--- a/docs/user_guide/errata.dox
+++ b/docs/user_guide/errata.dox
@@ -31,7 +31,7 @@ namespace arm_compute
@section S7_1_errata Errata
- (COMPMID-6271) Under certain conditions, CLArgMinMaxLayer validation tests may fail
- - Versions Affected: >= v20.02
+ - Versions Affected: >= v20.02 && < v23.08
- OSs Affected: Linux
- Conditions:
- Backend: OpenCL
diff --git a/src/core/CL/kernels/CLArgMinMaxLayerKernel.cpp b/src/core/CL/kernels/CLArgMinMaxLayerKernel.cpp
index 8438739764..3136d698c4 100644
--- a/src/core/CL/kernels/CLArgMinMaxLayerKernel.cpp
+++ b/src/core/CL/kernels/CLArgMinMaxLayerKernel.cpp
@@ -86,7 +86,9 @@ void CLArgMinMaxLayerKernel::configure(const CLCompileContext &compile_context,
_op = op;
// Set build options
- const auto vector_size = adjust_vec_size(16U, input->info()->dimension(0));
+ const auto adjusted_vector_size = adjust_vec_size(16U, input->info()->dimension(0));
+ const auto vector_size = (adjusted_vector_size == 3U && axis == 0U) ? 2U : adjusted_vector_size; // the opencl kernel only supports sizes 2, 4, 8 and 16.
+
CLBuildOptions build_opts;
build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type()));
build_opts.add_option("-DVEC_SIZE_LEFTOVER=" + support::cpp11::to_string(input->info()->dimension(0) % vector_size));