I thought I read somewhere that Zen 2 will downclock based on heat, rather than simple instruction set heuristics. I can't find a source though, so take that as hearsay for now.
Intel CPUs do downclock for both avx and avx-512. Many motherboards let you configure that in the bios.
I bought both a 9940X and a (delidded) 7980XE for avx-512 intensive workloads. I use a water cooler with a 360mm radiator.
The bios for these (overclockable) chips contains "AVX Offset" and "AVX512 Offset" parameters. I haven't really tested avx loads, but the avx512 downclock is necesary. They run at 70-80C when running all cores at 3.5GHz in avx512 heavy loads. I don't want to push the temperatures further than that. I don't think there's any practical way to avoid having to downclock.
It does gives a sizeable speed boost overall (for those workloads).
Re: this thread
I'd bet those avx512 workloads will be faster as avx2 workloads running on two 64 core CPUs with avx2 than one 56 core CPU with avx512, all else equal.
But it sounds like, instead of all else being equal, things like IPC favor Zen2.
EDIT: If folks happen to be interested, I compared a bunch of different "^" (aka, "pow") functions in Julia, running on my 9940X here:
https://discourse.julialang.org/t/slow-arbitrary-base-expone...
Someone else shared results with their Ryzen 2950X here:
https://discourse.julialang.org/t/workstation-advice-for-mos...
The vectorized versions were those with "sleef" or "xsimd" in their name.
They tended to be 1.5 to 3 times faster, while the nonvectorized versions were 1.25 to 1.35 times faster on the 9940X.
Some of my other code is likely to show a much bigger difference. For example, many small matrix multiplication operations get to take advantage of avx512's masks to vectorize efficiently, as well as the fact avx512 has 32 instead of 16 floating point registers to hold larger matrix blocks in registers, increasing the vfma to vmov ratio.
I suspect the 3.2x difference in speed in the "jsleefpowcob!" benchmark is because of the register counts. I suspect with avx512 the compiler was able to avoid register spills, while with avx2 it had to reload a lot of data on each loop iteration.
The biggest problem with avx512 IMO is that compilers seem bad at taking advantage of it (eg, they never use masks) unless you babysit them / write code with vectorization constantly in mind.
gcc for example will not use 512 bit vectors by default. You must explicitly specify "-mprefer-vector-width=512". My tests (mostly just the Polyhedron Fortran benchmarks, as a set of numerical code) seemed to confirm that gcc (gfortran) was doing the right thing.
Meaning unless you intend to go low level and use it yourself (which can be a rewarding hobby!), or have workloads where optimized libraries exist, you won't see any benefit from avx512.