From 0841ca085301e8ddbc9627b2be55758b66437c15 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Mon, 1 Feb 2021 14:37:02 +0000 Subject: Fix OpenCL direct convolution - The ARM DOT macro was using wrong variables for performing the dot product - K0 could be a non power of 2 values when IFM was not a multiple of 16 - Refactor the test for direct convolution NHWC Resolves COMPMID-4135, COMPMID-4155 Change-Id: I3a2dc89ef613ae20245cfc28e76ea36c55eaf81d Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4962 Comments-Addressed: Arm Jenkins Reviewed-by: TeresaARM Tested-by: Arm Jenkins --- src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp index 3ca72b3e5d..3948261bc3 100644 --- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp +++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp @@ -375,7 +375,7 @@ void CLDirectConvolutionLayerKernel::configure(const CLCompileContext &compile_c const unsigned int n0 = win_config.second.x().step(); const unsigned int m0 = win_config.second.y().step(); - const unsigned int k0 = std::min(static_cast(_input->info()->dimension(channel_idx)), 16u); + const unsigned int k0 = adjust_vec_size(16u, _input->info()->dimension(channel_idx)); const unsigned int partial_store_n0 = _output->info()->dimension(channel_idx) % n0; const unsigned int partial_store_m0 = (_output->info()->dimension(width_idx) * _output->info()->dimension(height_idx)) % m0; const unsigned int pad_left = conv_info.pad_left(); -- cgit v1.2.1