From 5c642950a5d0232ebdfa6b460b4515e6e2b8828d Mon Sep 17 00:00:00 2001 From: Gengxin Xie Date: Thu, 4 Nov 2021 16:10:57 +0800 Subject: [PATCH] Bug Fix: correct the bug that won't define EIGEN_HAS_FP16_C if the compiler isn't clang --- Eigen/src/Core/util/ConfigureVectorization.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/util/ConfigureVectorization.h b/Eigen/src/Core/util/ConfigureVectorization.h index 2e5e731ac..dd6d45171 100644 --- a/Eigen/src/Core/util/ConfigureVectorization.h +++ b/Eigen/src/Core/util/ConfigureVectorization.h @@ -438,11 +438,11 @@ #include #endif -#if defined(__F16C__) && (!defined(EIGEN_GPUCC) && (!defined(EIGEN_COMP_CLANG) || EIGEN_COMP_CLANG>=380)) +#if defined(__F16C__) && (!defined(EIGEN_GPUCC) && (!EIGEN_COMP_CLANG || EIGEN_COMP_CLANG>=380)) // We can use the optimized fp16 to float and float to fp16 conversion routines #define EIGEN_HAS_FP16_C - #if defined(EIGEN_COMP_CLANG) + #if EIGEN_COMP_CLANG // Workaround for clang: The FP16C intrinsics for clang are included by // immintrin.h, as opposed to emmintrin.h as suggested by Intel: // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=FP16C&expand=1711