From 3791ac8a1a5342a84f2816a5d31201fb8c1ee51a Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Wed, 28 Jun 2023 17:57:21 +0000 Subject: [PATCH] Fix supportsMMA to obey EIGEN_ALTIVEC_MMA_DYNAMIC_DISPATCH compilation flag and compiler support. --- Eigen/src/Core/arch/AltiVec/MatrixProduct.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h index e86cc5b4f..54a7195f8 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h @@ -2714,10 +2714,10 @@ EIGEN_ALWAYS_INLINE bool supportsMMA() #if defined(EIGEN_ALTIVEC_MMA_ONLY) return true; #else -#if EIGEN_COMP_LLVM - return false; // No dynamic dispatch for LLVM -#else +#if defined(EIGEN_ALTIVEC_MMA_DYNAMIC_DISPATCH) && __has_builtin(__builtin_cpu_supports) return __builtin_cpu_supports ("arch_3_1") && __builtin_cpu_supports ("mma"); +#else + return false; // No dynamic dispatch for LLVM #endif #endif }