3 ms·
> Also this is just false [1]. Running AVX-512 adjusts the > BASE clock for the package. There are throttling attempts > to ensure every other core on the packa
by BeeOnRope 8y ago
> Also this is just false [1]. Running AVX-512 adjusts the
> BASE clock for the package. There are throttling attempts
> to ensure every other core on the package throttles back.
> This is a package wide effect, not a per-core effect.
This was true of server CPUs before Skylake-SP, but on Skylake-SP this effect is per core. This was widely touted by Intel since it was an improvement over the old behavior.
What the other cores are doing still matters since the count of "active cores" is used to look up the turbo frequency for each other core, depending on its license: but for this purpose it only matters if the others are running or halted, not _what_ they are running.
If you don't believe it, I've shared a benchmark you can try yourself if you have access to Skylake server [1]. Run with --spec avx512_fma_t/1,scalar_iadd/3, for example, to kick off 1 core of heavy FMA ops in parallel with 3 cores of scalar-only ops. You'll see only the FMA core drops down to the L2 license.
Light instructions include integer operations other than
multiplication, logical operations, data shuffling
(such as vpermw and vpermd) and so forth.
> This is false according cloudflare [2] which you've
> linked. They test your "light" carry less adding,
> shifting, and xoring (these are the only operations
> in ChaCha20 [4]). It cost too much.
Again, you can test this yourself with avx-turbo [1], there are a variety of tests there that show everything except FP operations and integer multiplications (which execute on the FP unit) are treated as light. Of course, the tests aren't exhaustive, but they hit the main categories of instructions.
Note that even light AVX-512 instructions cause the chip to transition to a lower frequency (the so-called L1 license, which is usually about half way between the fasted L0 and slowest L2 speed). So even if ChaCha doesn't use any heavy instructions, any AVX-512 at all will slow down your frequency. They only reported a 5% to 7% reduction in performance, which could easily be consistent with a downclock to the L1 frequency.
> The literal example to show AVX-512 is good at ends
> with statement that people using AVX-512 are now
> actively avoiding it.
I think the example is intended to show that AVX-512 indeed significantly speeds up the parts of the code where it is applied: but if that makes up a small part of your code overall, it might not be worth it, because the rest of your code may suffer a frequency penalty.
Unlike some earlier ISA extensions, there is no simple answer like "use it" or "don't": there are complex tradeoffs. That's what you should get out of this article.
[1] https://github.com/travisdowns/avx-turbo https://github.com/travisdowns/avx-turbo