From my measurements, it looks like AVX2 auto-dispatch code is not called when I build a shared (dynamic) library on macOS. The resulting code size definitely differs with and without -axCORE-AVX2 enabled during compilation. Auto-dispatch is definitely working when producing standalone applications. I'm using MacBook Pro Early 2015 which features a processor with AVX2. Should I use some specific switch to enable auto-dispatch in dynamic libraries? I have icc 17.0.4. I use g++ to link the dynamic library due to mixed use of ObjectiveC. Anyway, standalone application is also linked with g++ yet auto-dispatch works there.
↧