From 9a6131b79478f83d390edf25ed1c3ad5f6548130 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Tue, 1 Dec 2020 11:38:03 +0000 Subject: COMPMID-4026 Fix FP32 CLDirectConvolutionLayer nightly mismatches The mismatches are caused by out of bound memory access on weight tensor due to lack of padding in the channel (first in NHWC) dimension. Signed-off-by: SiCong Li Change-Id: I5a73f190f8e131c67ed7769f6f716db9d79dc674 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4628 Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Georgios Pinitas Comments-Addressed: 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 a642eabc4e..8884521794 100644 --- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp +++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp @@ -375,7 +375,7 @@ std::pair validate_and_configure_window(ITensorInfo *input, ITen AccessWindowStatic input_access(input, 0, -conv_pad_left, ceil_to_multiple(input->dimension(0), num_elems_read_per_iteration_x), ceil_to_multiple(input->dimension(1) + conv_info.pad_right(), num_elems_read_per_iteration_y)); - AccessWindowStatic weights_access(weights, 0, 0, weights->dimension(0), weights->dimension(1)); + AccessWindowStatic weights_access(weights, 0, 0, ceil_to_multiple(weights->dimension(0), num_elems_read_per_iteration_x), weights->dimension(1)); AccessWindowRectangle output_access(output, 0, 0, num_elems_written_per_iteration_x, num_elems_written_per_iteration_y); window_changed = update_window_and_padding(win, input_access, weights_access, output_access); output_access.set_valid_region(win, ValidRegion(Coordinates(), output->tensor_shape())); -- cgit v1.2.1