diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2022-03-17 12:52:02 +0000 |
---|---|---|
committer | ramelg01 <ramy.elgammal@arm.com> | 2022-03-29 10:26:17 +0100 |
commit | a5d61bf5cd566955f3902e07c43c5c1c059bf8e9 (patch) | |
tree | 7a5e4853d6998c207ca4f333df707d64068bb790 /arm_compute/runtime/NEON/functions | |
parent | b83e67238bf84c5780f9d27c87cf30342099b291 (diff) | |
download | ComputeLibrary-a5d61bf5cd566955f3902e07c43c5c1c059bf8e9.tar.gz |
NEQLSTM: Add support for QASYMM8_SIGNED for input_to_forget_weights
* QLSTM only supports QSYMM8 for the argument input_to_forget_weights
* We add support for QASYMM8_SIGNED by dequantizing and requantizing to QSYMM8
* Resolves COMPMID-5184
Change-Id: I1cae18d81dafdb7ae722b520a1354cf4a56b9606
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7321
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
(cherry picked from commit 187a041dedf8e9db0c9e0652f13f8639dca880f3)
Diffstat (limited to 'arm_compute/runtime/NEON/functions')
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEQLSTMLayer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEQLSTMLayer.h b/arm_compute/runtime/NEON/functions/NEQLSTMLayer.h index acbd92cff7..185d821ec0 100644 --- a/arm_compute/runtime/NEON/functions/NEQLSTMLayer.h +++ b/arm_compute/runtime/NEON/functions/NEQLSTMLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Arm Limited. + * Copyright (c) 2020-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -29,9 +29,11 @@ #include "arm_compute/runtime/NEON/functions/NEArithmeticAddition.h" #include "arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h" #include "arm_compute/runtime/NEON/functions/NECopy.h" +#include "arm_compute/runtime/NEON/functions/NEDequantizationLayer.h" #include "arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h" #include "arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h" #include "arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h" +#include "arm_compute/runtime/NEON/functions/NEQuantizationLayer.h" #include "arm_compute/runtime/NEON/functions/NETranspose.h" #include "arm_compute/runtime/common/LSTMParams.h" @@ -255,6 +257,9 @@ private: }; // Functions used + + NEDequantizationLayer _dequantize_input_to_forget_weights; + NEQuantizationLayer _quantize_input_to_forget_weights; NETranspose _transpose_input_to_forget_weights; NETranspose _transpose_input_to_cell_weights; NETranspose _transpose_input_to_output_weights; @@ -381,6 +386,9 @@ private: static Status validate_layer_norm(const ITensorInfo &in, const ITensorInfo &weight, const ITensorInfo &bias); // Temporary tensors + Tensor _input_to_forget_weights_f32{ nullptr }; + Tensor _input_to_forget_weights_symm8{ nullptr }; + Tensor _input_to_forget_weights_transposed{ nullptr }; Tensor _input_to_cell_weights_transposed{ nullptr }; Tensor _input_to_output_weights_transposed{ nullptr }; @@ -449,6 +457,7 @@ private: bool _has_peephole{ false }; bool _has_layer_norm{ false }; bool _projection_tensor_copy_required{ false }; + bool _convert_input_to_forget_weights_to_qsymm8{ false }; }; } // namespace arm_compute #endif /* ARM_COMPUTE_NEQLSTMLAYER_H */ |