diff options
author | Kenneth Heafield <github@kheafield.com> | 2021-12-10 16:06:47 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2021-12-10 16:06:47 +0300 |
commit | f4ba2e259ae82f91d163ef86a3d91edd743aaaf7 (patch) | |
tree | cbee59396f72e4999f26e56701445a73b7565e1d /intgemm/types.h | |
parent | 84d03709ab39f8b531eb455dedd341c09d29acaf (diff) | |
parent | 914aba846a266eb20fe1a74402dd65f2af697be9 (diff) |
Merge branch 'windows-cross'
Diffstat (limited to 'intgemm/types.h')
-rw-r--r-- | intgemm/types.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/intgemm/types.h b/intgemm/types.h index a4b35b4..44fb4e2 100644 --- a/intgemm/types.h +++ b/intgemm/types.h @@ -7,9 +7,22 @@ #endif #include <emmintrin.h> -#if defined(_MSC_VER) || defined(__INTEL_COMPILER) -/* MSVC does not appear to have target attributes but is also fine with just - * using intrinsics anywhere. +// clang-cl bug doesn't include these headers when pretending to be MSVC +// https://github.com/llvm/llvm-project/blob/e9a294449575a1e1a0daca470f64914695dc9adc/clang/lib/Headers/immintrin.h#L69-L72 +#if defined(_MSC_VER) && defined(__clang__) +#include <avxintrin.h> +#include <avx2intrin.h> +#include <smmintrin.h> +#include <avx512fintrin.h> +#include <avx512dqintrin.h> +#include <avx512bwintrin.h> +#include <avx512vnniintrin.h> +#endif + +#if (defined(_MSC_VER) && !defined(__clang__)) || defined(__INTEL_COMPILER) +/* Real MSVC does not appear to have target attributes but is also fine with + * just using intrinsics anywhere. clang-cl pretending to be MSVC requires + * target attributes, so it's excluded from the above. * * The Intel compiler has a bug whereby constructors with target attributes do * not link. Like this program doesn't compile with icpc: |