From ed5a492ba791d8c8b3334749d4ae946b8f11d13d Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Thu, 13 Sep 2018 16:22:01 +0100 Subject: COMPMID-1586: Add support for NHWC CLDeconvolutionLayer COMPMID-1651: Fix QASYMM8 CLDeconvolutionLayer This patch also extends the range of values used for testing Convolution and Deconvolution to cover quantized [-1.0f, 1.0f]. Change-Id: I8b280669db67bb3ec25bf5d411c8f5954f5b0dab Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/149869 Reviewed-by: Michalis Spyrou Tested-by: bsgcomp --- tests/validation/Helpers.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/validation/Helpers.cpp') diff --git a/tests/validation/Helpers.cpp b/tests/validation/Helpers.cpp index fd034b649e..eab6d5629f 100644 --- a/tests/validation/Helpers.cpp +++ b/tests/validation/Helpers.cpp @@ -302,6 +302,15 @@ void zeros(SimpleTensor &in, const Coordinates &anchor, const TensorShape &sh } } +std::pair get_quantized_bounds(const QuantizationInfo &quant_info, float min, float max) +{ + ARM_COMPUTE_ERROR_ON_MSG(min > max, "min must be lower equal than max"); + + const int min_bound = quant_info.quantize(min, RoundingPolicy::TO_NEAREST_UP); + const int max_bound = quant_info.quantize(max, RoundingPolicy::TO_NEAREST_UP); + return std::pair(min_bound, max_bound); +} + template void get_tile(const SimpleTensor &in, SimpleTensor &roi, const Coordinates &coord); template void get_tile(const SimpleTensor &in, SimpleTensor &roi, const Coordinates &coord); template void zeros(SimpleTensor &in, const Coordinates &anchor, const TensorShape &shape); -- cgit v1.2.1