aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-02-05 19:04:25 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:18 +0000
commit4e1e7dcd581adecd5ad9c0f9503fc3c43f8222ef (patch)
tree4e4dc42b57448c240cf8d7c9ef6ca7ebed827fa8
parent6232d04ff2afafba1171f61c164fa891471894a9 (diff)
downloadComputeLibrary-4e1e7dcd581adecd5ad9c0f9503fc3c43f8222ef.tar.gz
COMPMID-892: OCLGrind failures on both validation and benchmark
-Adds quantization info to the ActivationLayer benchmark fixture -Replaces clamp with convert_sat in depthwise conv kernel -Fixes ROIPooling execution slice Change-Id: Ie9bbe08abcfb8278456964e476b0948247c7ecba Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/118957 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
-rw-r--r--src/core/CL/cl_kernels/depthwise_convolution_quantized.cl3
-rw-r--r--src/core/CL/kernels/CLROIPoolingLayerKernel.cpp4
-rw-r--r--tests/benchmark/fixtures/ActivationLayerFixture.h7
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/CL/cl_kernels/depthwise_convolution_quantized.cl b/src/core/CL/cl_kernels/depthwise_convolution_quantized.cl
index 8a757fc2bd..450342ddfc 100644
--- a/src/core/CL/cl_kernels/depthwise_convolution_quantized.cl
+++ b/src/core/CL/cl_kernels/depthwise_convolution_quantized.cl
@@ -171,9 +171,8 @@ inline uchar8 convolution3x3(
pixels = ASYMM_MULT_BY_QUANT_MULTIPLIER_LESS_THAN_ONE(pixels, output_multiplier, output_shift, 8);
pixels = pixels + output_offset;
- pixels = clamp(pixels, 0, 255);
- return CONVERT(pixels, uchar8);
+ return CONVERT_SAT(pixels, uchar8);
}
/** This function computes the horizontal integral of the image.
diff --git a/src/core/CL/kernels/CLROIPoolingLayerKernel.cpp b/src/core/CL/kernels/CLROIPoolingLayerKernel.cpp
index 4e000c61b1..a07a42408a 100644
--- a/src/core/CL/kernels/CLROIPoolingLayerKernel.cpp
+++ b/src/core/CL/kernels/CLROIPoolingLayerKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -108,7 +108,7 @@ void CLROIPoolingLayerKernel::run(const Window &window, cl::CommandQueue &queue)
ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
- Window slice(window);
+ Window slice = window.first_slice_window_3D();
// Parallelize spatially and across the fourth dimension of the output tensor (also across ROIArray)
slice.set(Window::DimZ, window[3]);
diff --git a/tests/benchmark/fixtures/ActivationLayerFixture.h b/tests/benchmark/fixtures/ActivationLayerFixture.h
index 8558527ad1..cb8fa7f086 100644
--- a/tests/benchmark/fixtures/ActivationLayerFixture.h
+++ b/tests/benchmark/fixtures/ActivationLayerFixture.h
@@ -46,9 +46,10 @@ public:
shape.set(shape.num_dimensions(), batches);
// Create tensors
- const int fixed_point_position = 4;
- src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
+ const int fixed_point_position = 4;
+ const QuantizationInfo q_info(0.5f, -10);
+ src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position, q_info);
+ dst = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position, q_info);
// Create and configure function
act_layer.configure(&src, &dst, info);