Add MatMulInfo Information class to ComputeLibrary
Partially resolves : [COMPMID-5930]
Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>
Change-Id: Icb6c8a9d1b5a2c5c57e37cb7c877414ed500d0cc
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/494758
Tested-by: bsgcomp <bsgcomp@arm.com>
Comments-Addressed: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Sicong Li <sicong.li@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9181
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 24ef931..71ec926 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 @@
/** 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 */