3 ms·
Easy dynamic dispatch using GLIBC Hardware Capabilities
- loeg 1y agoIt is easy, but I'm not sure the coarse-grained levels accurately capture the craziness of which AVX512 feature bits are supported on which models once you get beyond amd64-v3. Maybe it doesn't matter. https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels https://en.wikipedia.org/wiki/X86-64#Microarchitecture_level...
- jeffbee 1y agoIf you want to branch around having or not having something like AVX-VNNI you still need to use IFUNC or just patch your own function pointers (this is the better choice, since IFUNC is both slow and a security risk).
- thrtythreeforty 1y agoThis looks really nice. No pain aside from 3x the build time. Does anyone know if Windows or macOS provide equivalent dynamic dispatch functionality that's resolved automatically? (Less of a big deal with macOS, but if you wanted to use SVE or something.)