diff options
author | Freddie Liardet <frederick.liardet@arm.com> | 2021-04-06 15:59:28 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-04-07 16:46:47 +0000 |
commit | 9d061b0c2a71f24c7fb00184e9409aaeea37f78d (patch) | |
tree | 80a487dda022fae84cdf09fa26df16a4186deb9f /tests/validation/reference/DeconvolutionLayer.cpp | |
parent | 37d65e4fd036529a2c7567f1987235d0b0258ab0 (diff) | |
download | ComputeLibrary-9d061b0c2a71f24c7fb00184e9409aaeea37f78d.tar.gz |
Add per channel quantization support for NEDeconvolutionLayer
Add QSYMM8_PER_CHANNEL support on weight input for NEDeconvolutionLayer and reference version.
Resolves: COMPMID-3437
Signed-off-by: Freddie Liardet <frederick.liardet@arm.com>
Change-Id: I7c9a28d4d0fea324ed8e5a24fbd0422e5ede145c
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5364
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validation/reference/DeconvolutionLayer.cpp')
-rw-r--r-- | tests/validation/reference/DeconvolutionLayer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/validation/reference/DeconvolutionLayer.cpp b/tests/validation/reference/DeconvolutionLayer.cpp index 891828533f..afbf063e63 100644 --- a/tests/validation/reference/DeconvolutionLayer.cpp +++ b/tests/validation/reference/DeconvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,7 +24,6 @@ #include "ConvolutionLayer.h" #include "tests/validation/Helpers.h" - namespace arm_compute { namespace test @@ -33,8 +32,8 @@ namespace validation { namespace reference { -template <typename T, typename TB> -SimpleTensor<T> deconvolution_layer(const SimpleTensor<T> &src, const SimpleTensor<T> &weights, const SimpleTensor<TB> &bias, const TensorShape &output_shape, +template <typename T, typename TW, typename TB> +SimpleTensor<T> deconvolution_layer(const SimpleTensor<T> &src, const SimpleTensor<TW> &weights, const SimpleTensor<TB> &bias, const TensorShape &output_shape, const PadStrideInfo &info, QuantizationInfo out_qinfo) { // Create reference @@ -99,7 +98,7 @@ SimpleTensor<T> deconvolution_layer(const SimpleTensor<T> &src, const SimpleTens } // Flip weights by 180 degrees - SimpleTensor<T> weights_flipped{ weights.shape(), weights.data_type(), 1, weights.quantization_info() }; + SimpleTensor<TW> weights_flipped{ weights.shape(), weights.data_type(), 1, weights.quantization_info(), weights.data_layout() }; #if defined(_OPENMP) #pragma omp parallel for #endif /* _OPENMP */ @@ -143,6 +142,8 @@ SimpleTensor<T> deconvolution_layer(const SimpleTensor<T> &src, const SimpleTens template SimpleTensor<uint8_t> deconvolution_layer(const SimpleTensor<uint8_t> &src, const SimpleTensor<uint8_t> &weights, const SimpleTensor<int32_t> &bias, const TensorShape &output_shape, const PadStrideInfo &info, QuantizationInfo out_quant_info); +template SimpleTensor<uint8_t> deconvolution_layer(const SimpleTensor<uint8_t> &src, const SimpleTensor<int8_t> &weights, const SimpleTensor<int32_t> &bias, const TensorShape &output_shape, + const PadStrideInfo &info, QuantizationInfo out_quant_info); template SimpleTensor<int8_t> deconvolution_layer(const SimpleTensor<int8_t> &src, const SimpleTensor<int8_t> &weights, const SimpleTensor<int32_t> &bias, const TensorShape &output_shape, const PadStrideInfo &info, QuantizationInfo out_quant_info); template SimpleTensor<float> deconvolution_layer(const SimpleTensor<float> &src, const SimpleTensor<float> &weights, const SimpleTensor<float> &bias, const TensorShape &output_shape, |