SIMD support at runtime
I was making a XCode obj-c application, and I decided to turn on AVX2, through XCode's Enable Vector Extensions option.
I started up my app, but it crashed.
After a few hours I figured out that the issue was my Mac actually didn't support AVX2 (third gen i7).
The thing is, I still expected it to work because I had commented out all of the lines of code that used AVX2 instructions.
That meant that there was NO avx2 code even IN my app, I just had AVX2 support on. I was under the assumption that AVX2 was not used until I actually called the functions?
My question is:
How do I get an app that was compiled with the AVX2 instruction set but had conditions at RUNTIME that checked if the machine supported AVX2, and if it didn't, then there would be NO AVX2 instructions activated?
from Recent Questions - Stack Overflow https://ift.tt/3kDc8VZ
https://ift.tt/eA8V8J
Comments
Post a Comment