Yes, at least on AVX512 the compiler will throw a fit on trying to use intrinsics in case you haven't enabled TU-global architecture with options.
Yes, at least on AVX512 the compiler will throw a fit on trying to use intrinsics in case you haven't enabled TU-global architecture with options.
Seems to work fine for me: https://gcc.godbolt.org/z/hPexshjoa
Likely a different compiler/version. GCC had this error for me recently:
error: inlining failed in call to 'always_inline' 'float _mm512_reduce_add_ps(__m512)': target specific option mismatch
Compiler Explorer link or it didn't happen? :-)