Avoiding AVX-512

It seems that Clear Linux, by default, checks the instruction sets supported by the processor and links with those libraries supporting that instruction set. So, if a processor supports AVX-512, Clear Linux, by default, will link with the AVX-512 enabled libraries.

But, for certain workloads, it might be preferable to avoid AVX-512 because the increased throughput doesn’t sufficiently compensate for the lower clock speeds. Is it possible to trick Clear Linux into thinking the processor doesn’t support AVX-512 (perhaps on boot, via some kernel parameter) so that it avoids using AVX-512 libraries altogether? Or, is there a finer way to control the version of the library that a piece of software links with?

We put our optimizations through the test mill regularly. If you know of a specific workload that suffers due to avx512 usage, don’t… hide it. Please share this information with us so we can investigate and adjust for it!

However, to try, you can always sudo rm /usr/lib64/haswell/avx_512/libfoo.so.1; sudo ldconfig temporarily, and swupd verify --fix will bring those files you removed back (be careful to remove the right ones and not everything in /usr/lib64.

It’s a highly customized workload that we’re trying to tune for optimal performance. So, having the ability to compare the performance with both AVX512 enabled and disabled (instead of just accepting the default) is helpful. Thanks for the tip.

1 Like