diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2019-07-22 21:42:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-22 21:42:54 -0500 |
| commit | 607bf0d4e2b3e6ca246570cb8093e2528ea603b6 (patch) | |
| tree | 101db329257556e3cf4cf875491802484a7cda35 /numpy | |
| parent | da9ec01b322d98d7aaefbd57bad98f72f3c34d0b (diff) | |
| parent | 315772491fdf8106f35f275d6ec1ed9477101b4d (diff) | |
| download | numpy-607bf0d4e2b3e6ca246570cb8093e2528ea603b6.tar.gz | |
Merge pull request #14081 from charris/backport-14074
BUG: fix build issue on icc 2016
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/setup_common.py | 2 | ||||
| -rw-r--r-- | numpy/core/src/umath/cpuid.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index bf6abcf02..307fab334 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -138,6 +138,8 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), # broken on OSX 10.11, make sure its not optimized away ("volatile int r = __builtin_cpu_supports", '"sse"', "stdio.h", "__BUILTIN_CPU_SUPPORTS"), + ("volatile int r = __builtin_cpu_supports", '"avx512f"', + "stdio.h", "__BUILTIN_CPU_SUPPORTS_AVX512F"), # MMX only needed for icc, but some clangs don't have it ("_m_from_int64", '0', "emmintrin.h"), ("_mm_load_ps", '(float*)0', "xmmintrin.h"), # SSE diff --git a/numpy/core/src/umath/cpuid.c b/numpy/core/src/umath/cpuid.c index 51c540457..8673f1736 100644 --- a/numpy/core/src/umath/cpuid.c +++ b/numpy/core/src/umath/cpuid.c @@ -57,10 +57,10 @@ npy_cpu_supports(const char * feature) { #ifdef HAVE___BUILTIN_CPU_SUPPORTS if (strcmp(feature, "avx512f") == 0) { -#if defined(__GNUC__) && (__GNUC__ < 5) - return 0; -#else +#ifdef HAVE___BUILTIN_CPU_SUPPORTS_AVX512F return __builtin_cpu_supports("avx512f") && os_avx512_support(); +#else + return 0; #endif } else if (strcmp(feature, "avx2") == 0) { |
