aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);