aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-07-16 16:16:43 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-07-22 02:25:50 +0000
commit4ee8b1599dbaf7634d25607fa5ac96ba3dc6b0f2 (patch)
tree2f8362d33cdad4212f4b96995681c68184c759e1 /src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp
parent59fd7a722e5bc7e85309d6200bc37a772721a719 (diff)
downloadComputeLibrary-4ee8b1599dbaf7634d25607fa5ac96ba3dc6b0f2.tar.gz
Update GEMM assembly kernels
- Introduce Fp32 kernels with internal calculations in Bfloat16 when fast_mode is enabled - Improve kernel selection heuristics Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I68a9e7e862b6fd2721b46e0d7cc791091c4ab279 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5965 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp')
-rw-r--r--src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp b/src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp
index f98ccdc7d3..6db9c0cdf3 100644
--- a/src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp
+++ b/src/core/NEON/kernels/arm_gemm/kernels/sve_hybrid_fp16_mla_6x4VL.hpp
@@ -25,6 +25,7 @@
#ifdef ARM_COMPUTE_ENABLE_SVE
#include "../std_transforms_sve.hpp"
+#include "../performance_parameters.hpp"
#define ARGLIST \
unsigned int, const unsigned int *, \
@@ -38,11 +39,13 @@ namespace arm_gemm
{
// Actual kernel implementations
void sve_hybrid_fp16_mla_6x4VL( ARGLIST );
+void sve_hybrid_fp16_mla_6x4VL_a64fx( ARGLIST );
class cls_sve_hybrid_fp16_mla_6x4VL
{
public:
- typedef __fp16 operand_type;
+ typedef __fp16 lhs_operand_type;
+ typedef __fp16 rhs_operand_type;
typedef __fp16 result_type;
typedef void (*kern_type)( ARGLIST );
@@ -68,16 +71,41 @@ public:
return true;
}
- StdTransformsSVE<operand_type, result_type, 6, 4, 1> transforms = {};
+ StdTransformsSVE<rhs_operand_type, result_type, 6, 4, 1> transforms = {};
+ template<typename T>
+ static inline PerformanceParameters get_performance_parameters(const CPUInfo *ci)
+ {
+
+ if (std::is_same<T, __fp16>::value) {
+ switch (ci->get_cpu_model()) {
+ default:
+ return { 15.90 };
+ case CPUModel::A510:
+ return { 12.44 };
+ case CPUModel::V1:
+ return { 31.51 };
+ }
+ }
+
+ return { 1.0 };
+ }
// Default to the generic kernel
kern_type kernel=sve_hybrid_fp16_mla_6x4VL;
- cls_sve_hybrid_fp16_mla_6x4VL(const CPUInfo *)
+ cls_sve_hybrid_fp16_mla_6x4VL(const CPUInfo *ci)
{
+ switch(ci->get_cpu_model()) {
+ default:
+ break;
+ case CPUModel::A64FX:
+ kernel=sve_hybrid_fp16_mla_6x4VL_a64fx;
+ break;
+ }
}
};
} // namespace arm_gemm
#undef ARGLIST
-#endif // ARM_COMPUTE_ENABLE_SVE
+
+#endif // __aarch64__