From d9c4afe5b7a183fec9f7cf6aa99e3534cd258feb Mon Sep 17 00:00:00 2001 From: Peter Georg Date: Thu, 11 Mar 2021 12:58:49 +0100 Subject: [PATCH] Fix inconsistent configure option AVX512 Before this change AVX512 enabled different instruction sets depending on the compiler: For Intel C++ Compiler Classic (ICC): AVX512F, AVX512CD, AVX512DQ, AVX512BW, AVX512VL i.e. Intel Xeon Skylake and newer For Intel ICX, gcc, clang: AVX512F, AVX512CD, AVX512ER, AVX512PF i.e. Intel Xeon Phi x200/x205 (KNL/KNM) With this commit AVX512 now only enables the common instruction sets supported by all CPUs supporting any AVX-512 instructions set: AVX512F and AVX512CD (called COMMON-AVX512 by icc) --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5f165412..afd5cbad 100644 --- a/configure.ac +++ b/configure.ac @@ -444,7 +444,7 @@ case ${ax_cv_cxx_compiler_vendor} in SIMD_FLAGS='-mavx2 -mfma -mf16c';; AVX512) AC_DEFINE([AVX512],[1],[AVX512 intrinsics]) - SIMD_FLAGS='-mavx512f -mavx512pf -mavx512er -mavx512cd';; + SIMD_FLAGS='-mavx512f -mavx512cd';; SKL) AC_DEFINE([AVX512],[1],[AVX512 intrinsics for SkyLake Xeon]) SIMD_FLAGS='-march=skylake-avx512';; @@ -498,7 +498,7 @@ case ${ax_cv_cxx_compiler_vendor} in SIMD_FLAGS='-march=core-avx2 -xcore-avx2';; AVX512) AC_DEFINE([AVX512],[1],[AVX512 intrinsics]) - SIMD_FLAGS='-xcore-avx512';; + SIMD_FLAGS='-xcommon-avx512';; KNC) AC_DEFINE([IMCI],[1],[IMCI Intrinsics for Knights Corner]) SIMD_FLAGS='';;