From c5849580868b7ad101572f1b90c87f3daa06385d Mon Sep 17 00:00:00 2001 From: Adnan AlSinan Date: Thu, 5 May 2022 11:13:19 +0100 Subject: Extend GemmLowp reference to support BATCH MATMUL for quantized data type - Extends GEMMInfo class to include flags for transposing A and B. - Extends GEMMLowp fixtrues to have an option for transposing A and B. Resolves COMPMID-5075 Signed-off-by: Adnan AlSinan Change-Id: If5e4b7e2b7b19ca30808a78a9641d8ba3f176a26 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7458 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice --- arm_compute/core/Types.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'arm_compute/core/Types.h') diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 473102a95a..1548816e91 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -2089,7 +2089,8 @@ public: _fast_math(false), _fp_mixed_precision(false), _broadcast_bias(false), - _pretranspose_B(true), + _pretranspose_A(false), + _pretranspose_B(false), _activation_info(), _post_ops() { @@ -2124,7 +2125,8 @@ public: _fast_math(fast_math), _fp_mixed_precision(fp_mixed_precision), _broadcast_bias(broadcast_bias), - _pretranspose_B(reshape_b_only_on_first_run), + _pretranspose_A(false), + _pretranspose_B(false), _activation_info(activation_info), _post_ops(post_ops) { @@ -2227,6 +2229,22 @@ public: { return _broadcast_bias; }; + /** Flag which specifies whether A should be pre-transposed if supported. + * + * @return True if A should be pre-transposed else false. + */ + bool pretranspose_A() const + { + return _pretranspose_A; + }; + /** Set pre-transpose A flag + * + * @param[in] flag Flag to set + */ + void set_pretranspose_A(bool flag) + { + _pretranspose_A = flag; + } /** Flag which specifies whether b should be pre-transposed if supported. * * @return True if b should be pre-transposed else false. @@ -2287,6 +2305,7 @@ private: bool _fast_math; bool _fp_mixed_precision; bool _broadcast_bias; + bool _pretranspose_A; bool _pretranspose_B; ActivationLayerInfo _activation_info; experimental::PostOpList _post_ops; -- cgit v1.2.1