From 6fdfaa856b1eb69d6afbef5727b99756912fc6fa Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 29 Nov 2017 14:27:24 +0000 Subject: COMPMID-713: Address failures in OCLGrind for CLDirectConvolution -Changes way of clamping in the kernel side. -Fills padding with quantized values Change-Id: I94d17c341fd637fbb24390722162b551b62d16cb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111114 Reviewed-by: Anthony Barbier Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com --- src/core/CL/cl_kernels/direct_convolution_1x1_3x3_5x5_quantized.cl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/CL/cl_kernels') diff --git a/src/core/CL/cl_kernels/direct_convolution_1x1_3x3_5x5_quantized.cl b/src/core/CL/cl_kernels/direct_convolution_1x1_3x3_5x5_quantized.cl index cbe826639d..d0cf032ac1 100644 --- a/src/core/CL/cl_kernels/direct_convolution_1x1_3x3_5x5_quantized.cl +++ b/src/core/CL/cl_kernels/direct_convolution_1x1_3x3_5x5_quantized.cl @@ -243,9 +243,7 @@ __kernel void direct_convolution_1x1_3x3_5x5_quantized( pixels0 = ASYMM_MULT_BY_QUANT_MULTIPLIER_LESS_THAN_ONE(pixels0, output_multiplier, output_shift, 8); pixels0 = pixels0 + output_offset; - pixels0 = max(pixels0, 0); - pixels0 = min(pixels0, 255); - vstore8(convert_uchar8(pixels0), 0, (__global uchar *)dst.ptr); + vstore8(convert_uchar8_sat(pixels0), 0, (__global uchar *)dst.ptr); } #endif // defined(DATA_TYPE) && defined(STRIDE_X) && defined(WEIGHTS_DEPTH) -- cgit v1.2.1