diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-10-17 18:37:26 +0100 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-10-24 09:11:40 +0000 |
commit | 07263980e66059a91ce57612e4ca8f4b2a2a206a (patch) | |
tree | 138dc3ecf835df9f38a60959379a52eca08f8b0f /tests/validation/reference/GEMMLowp.cpp | |
parent | 05069f07bcf95676597698a79926327555276362 (diff) | |
download | ComputeLibrary-07263980e66059a91ce57612e4ca8f4b2a2a206a.tar.gz |
COMPMID-2501: Support multiplier > 1 during QASYMM8 requantization for Quantized LSTM
Change-Id: I7eddbdf77881f313b707b9e59428245f1330a2cf
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2119
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'tests/validation/reference/GEMMLowp.cpp')
-rw-r--r-- | tests/validation/reference/GEMMLowp.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/validation/reference/GEMMLowp.cpp b/tests/validation/reference/GEMMLowp.cpp index 97d05327e7..4283cb5bac 100644 --- a/tests/validation/reference/GEMMLowp.cpp +++ b/tests/validation/reference/GEMMLowp.cpp @@ -112,7 +112,14 @@ void quantize_down_int32_to_int16_scale_by_fixedpoint(const SimpleTensor<T> *in, } // Fixed point multiplication - result = asymm_rounding_divide_by_pow2(asymm_int_mult(result, result_fixedpoint_multiplier), result_shift); + if(result_shift < 0) + { + result = asymm_int_mult(result * (1 << (-result_shift)), result_fixedpoint_multiplier); + } + else + { + result = asymm_rounding_divide_by_pow2(asymm_int_mult(result, result_fixedpoint_multiplier), result_shift); + } // Bounded ReLu if(min != max) |