Fixes to make generic backend build with AVX512

See merge request libeigen/eigen!2064

Co-authored-by: Rasmus Munk Larsen <rmlarsen@google.com>
This commit is contained in:
Rasmus Munk Larsen
2025-11-06 22:50:32 +00:00
committed by Antonio Sánchez
parent ec93a6d098
commit fecfa7f27e
3 changed files with 4 additions and 2 deletions

View File

@@ -415,6 +415,7 @@ using std::ptrdiff_t;
#include "src/Core/CoreIterators.h"
#include "src/Core/ConditionEstimator.h"
#if !defined(EIGEN_VECTORIZE_GENERIC)
#if defined(EIGEN_VECTORIZE_VSX)
#include "src/Core/arch/AltiVec/MatrixProduct.h"
#elif defined EIGEN_VECTORIZE_NEON
@@ -426,6 +427,7 @@ using std::ptrdiff_t;
#if defined(EIGEN_VECTORIZE_AVX512)
#include "src/Core/arch/AVX512/GemmKernel.h"
#endif
#endif
#include "src/Core/Select.h"
#include "src/Core/VectorwiseOp.h"

View File

@@ -184,7 +184,7 @@ EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet8cf>(const Packet8cf& a
}
template <>
EIGEN_STRONG_INLINE Packet4cf predux_half_dowto4<Packet8cf>(const Packet8cf& a) {
EIGEN_STRONG_INLINE Packet4cf predux_half<Packet8cf>(const Packet8cf& a) {
__m256 lane0 = extract256<0>(a.v);
__m256 lane1 = extract256<1>(a.v);
__m256 res = _mm256_add_ps(lane0, lane1);

View File

@@ -541,7 +541,7 @@ EIGEN_CLANG_PACKET_MATH_FLOAT(Packet8d)
#endif
// --- Fused Multiply-Add (MADD) ---
#if defined(EIGEN_VECTORIZE_FMA) && __has_builtin(__builtin_elementwise_fma)
#if defined(__FMA__) && __has_builtin(__builtin_elementwise_fma)
#define EIGEN_CLANG_PACKET_MADD(PACKET_TYPE) \
template <> \
EIGEN_STRONG_INLINE PACKET_TYPE pmadd<PACKET_TYPE>(const PACKET_TYPE& a, const PACKET_TYPE& b, \