From d538d161f6e55290bf1bb0b27cf26666379d0255 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Thu, 16 Feb 2023 16:22:32 +0000 Subject: Add MatMulInfo Information class to ComputeLibrary Partially resolves : [COMPMID-5930] Signed-off-by: Mohammed Suhail Munshi Change-Id: Icb6c8a9d1b5a2c5c57e37cb7c877414ed500d0cc Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/494758 Tested-by: bsgcomp Comments-Addressed: bsgcomp Reviewed-by: Sicong Li Reviewed-by: Jakub Sujak Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9181 Tested-by: Arm Jenkins Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- arm_compute/core/Types.h | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'arm_compute/core') diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 24ef931e88..71ec926483 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Arm Limited. + * Copyright (c) 2016-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -2694,5 +2694,49 @@ struct IOFormatInfo /** Align columns */ bool align_columns; }; + +/** Class for holding information related to matrix multiplication function + */ +class MatMulInfo +{ +public: + /* Get Adjoint LHS flag value */ + bool adj_lhs() const + { + return _adj_lhs; + } + /* Get Adjoint RHS flag value */ + bool adj_rhs() const + { + return _adj_rhs; + } + /* Get Fused Activation Layer Info */ + ActivationLayerInfo fused_activation() const + { + return _fused_act; + } + /* Set Adjoint LHS flag */ + MatMulInfo& adj_lhs(bool adj_lhs) + { + _adj_lhs = adj_lhs; + return *this; + } + /* Set Adjoint RHS flag */ + MatMulInfo& adj_rhs(bool adj_rhs) + { + _adj_rhs = adj_rhs; + return *this; + } + /* Set Fused Activation Layer Info */ + MatMulInfo& fused_activation(const ActivationLayerInfo& act_info) + { + _fused_act = act_info; + return *this; + } +private: + bool _adj_lhs{false}; + bool _adj_rhs{false}; + ActivationLayerInfo _fused_act{}; // disabled by default +}; } // namespace arm_compute #endif /* ARM_COMPUTE_TYPES_H */ -- cgit v1.2.1