aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2023-03-23 22:21:31 +0000
committerMohmun02 <MohammedSuhail.Munshi@arm.com>2023-04-13 09:24:52 +0000
commita1b1e41bb261f5613f443fed7071936a360686ed (patch)
treeeff2978a682fb24c8078df9c6c796fde51074255 /utils
parent8b7f42aa0e76a65a4ffa46ee875df6a6220695ae (diff)
downloadComputeLibrary-a1b1e41bb261f5613f443fed7071936a360686ed.tar.gz
Implement MatMul Function and Operator with Floating Point support for CPU
- Implements MatMul function and operator for floating point datatype FP16/FP32 - Includes support for transposing dynamic tensors prior to matrix multiplication. - Adds tests for 2D/3D/4D+ tensors in MatMul with F32/F16 datatype (with all combinations of transposed/not-transposed tensors) - Updates fixture to allow for testing fused activation in MatMul - Adds tests for matmul with and without fused activation Resolved: [COMPMID-5898] Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> Change-Id: Iefa84b26dd723c9a51e6c3f91023152c6c31ace2 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9411 Reviewed-by: SiCong Li <sicong.li@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index d40c3eb3d7..0327cd1b35 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -49,6 +49,7 @@
#include "arm_compute/runtime/CL/CLTunerTypes.h"
#include "arm_compute/runtime/CL/CLTypes.h"
#include "arm_compute/runtime/FunctionDescriptors.h"
+#include "arm_compute/runtime/NEON/functions/NEMatMul.h"
#include "arm_compute/runtime/common/LSTMParams.h"
#include "support/Cast.h"
#include "support/StringSupport.h"
@@ -3741,6 +3742,35 @@ inline std::string to_string(const arm_compute::MatMulKernelInfo &matmul_info)
return str.str();
}
+/** Formatted output of the arm_compute::CpuMatMulSettings type.
+ *
+ * @param[out] os Output stream.
+ * @param[in] settings arm_compute::CpuMatMulSettings type to output.
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const arm_compute::CpuMatMulSettings &settings)
+{
+ os << "CpuMatMulSettings="
+ << "["
+ << "fast_math=" << settings.fast_math()
+ << "]";
+
+ return os;
+}
+/** Formatted output of the arm_compute::CpuMatMulSettings type.
+ *
+ * @param[in] settings arm_compute::CpuMatMulSettings type to output.
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const arm_compute::CpuMatMulSettings &settings)
+{
+ std::stringstream str;
+ str << settings;
+ return str.str();
+}
+
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */