Can't use inline AVX because my function is compiled without "xsave" support,

I want to use embedded AVX, for example: __m256 factor_min = _mm256_set1_ps (1.329227); but I got the following compilation error:

Always_inline function '_mm256_set1_ps' requires target function "xsave", but will be built into "AveragePooling" function, which is compiled without "xsave" support

My environment: MacOS + Intel Core i7 + xcode8.3 enter image description here I saw another discussion about "xsave". But still don't know how to fix this compilation error. I don't know anything about assembly instructions. Is there an easy way to fix this error (maybe just change the xode setting?)? Many thanks.

I think Intel Core i7 can fully support AVX.

+3


source to share


1 answer


I had the same compilation issue on Xcode 9.2 on MacBook Pro 2017 which supports up to AVX2.

I managed to compile it by manually configuring AVX vector extensions instead of using the "Default Platform".

enter image description here



To see if your processor supports AVX, check the output of the following command in a terminal to see if it shows AVX or even AVX2:

sysctl -a | grep machdep.cpu.features

+3


source







All Articles