AVX2 on Ryzen: What should I look for?

GROMACS version: 2023.5
GROMACS modification: No

The question I originally had was about the performance difference I had in between two 8-core CPUs: a Ryzen 1700 on my own desktop versus a Xeon Silver 4208. Looking up the surface level info (and Passmark) about these processors led me to believe that the Ryzen processor would be competitive if not faster (both GPU accelerated or otherwise). That was not the case as the Xeon was comfortably faster during GPU accelerated runs, everything else remaining the same.

After doing some rough benchmarking and going through the manual, I came across the SIMD instruction set section in the install manual.

Now, when building on Xeon, CMAKE automatically sets the flag for AVX2_256 and AVX2_128 for the Ryzen 1700. Thinking this to be the reason for the performance difference, I manually rebuilt GROMACS using the AVX2_256 flag on the Ryzen. This did not show any difference.

In the manual, there is a difference between Zen1/Zen2 and Zen3 support for AVX2_256, which seems to be corroborated by some information on news websites about AVX2 instructions on Zen3 being improved.

If I’m browsing the market for AMD CPUs, what exactly should I look for to check if AVX2_256 is supported on the same level (whatever that could mean) as the Xeons? Or is that not possible at all due to Xeon being HEDT? Does the inclusion of AVX512 on Zen 4 mean something in this regard?

Hi!

For GPU-accelerated runs, SIMD is of little importance, since GPU does most of the heavy lifting. GPU cooling, PCI Express topology (extra switches on the motherboard), or many other things are likely to have bigger impact on the performance. If you see the difference in GPU runs but not in CPU runs, it’s definitely not related to SIMD level.

1 Like

Thank you for the reply.

I did manage to figure out that a massive chunk of the slowdown in the Ryzen system was due to running in a WSL2 environment versus running native Linux. In hindsight, that should have been pretty obvious.

1 Like