From 6e1791b1bfabc81f08d3117939f6eb5264ed4edf Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 2 Dec 2019 19:01:25 +0000 Subject: COMPMID-2764: Add support for QASYMM8_SIGNED in NEConvolutionLayer. Change-Id: I8fbbd2e399f48968337a60147098d04f27c2d1c0 Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/2402 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- tests/validation/reference/Convolution3d.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/validation/reference/Convolution3d.h') diff --git a/tests/validation/reference/Convolution3d.h b/tests/validation/reference/Convolution3d.h index 6ac5df93b3..6168f10741 100644 --- a/tests/validation/reference/Convolution3d.h +++ b/tests/validation/reference/Convolution3d.h @@ -24,6 +24,7 @@ #ifndef ARM_COMPUTE_TEST_VALIDATION_CONVOLUTION_H #define ARM_COMPUTE_TEST_VALIDATION_CONVOLUTION_H +#include "arm_compute/core/utils/misc/Requires.h" #include "arm_compute/core/utils/quantization/AsymmHelpers.h" #include "tests/validation/Helpers.h" #include "tests/validation/reference/UtilsQuantizedAsymm.h" @@ -94,10 +95,8 @@ inline void convolution3d(const SimpleTensor &in, const SimpleTensor &wei } // 3D convolution for QASYMM8 type -template < typename T, typename TW, typename TB, typename std::enable_if < std::is_same::value &&(std::is_same::value - || std::is_same::value) - &&std::is_same::value, - int >::type = 0 > +template < typename T, typename TW, typename TB, REQUIRES_TA((std::is_same::value || std::is_same::value) &&(std::is_same::value + || std::is_same::value)) > inline void convolution3d(const SimpleTensor &in, const SimpleTensor &weights, const SimpleTensor &bias, SimpleTensor &out, int i_offset, int w_offset, int b_offset, int o_offset, int xi, int yi, int width_in, int height_in, int depth_in, int width_weights, int height_weights, int dilation_x = 1, int dilation_y = 1, int filter_id = 0) @@ -172,7 +171,8 @@ inline void convolution3d(const SimpleTensor &in, const SimpleTensor &wei acc += (*b_ptr); // Quantize down - acc = validation::quantize_down_scale_by_fixedpoint(acc, output_multiplier, output_shift, output_offset, 0, 255); + acc = validation::quantize_down_scale_by_fixedpoint(acc, output_multiplier, output_shift, output_offset, + std::numeric_limits::lowest(), std::numeric_limits::max()); // Store the result *out_ptr = acc; -- cgit v1.2.1