VcDevel / Vc

SIMD Vector Classes for C++
BSD 3-Clause "New" or "Revised" License
1.45k stars 152 forks source link

Support AMD zen3 #317

Closed bernhardmgruber closed 2 years ago

bernhardmgruber commented 2 years ago

Github's runners seem to use AMD zen3 CPUs recently and this causes the CI to fail. This PR adds the minimum support to make Vc detect and build for AMD zen3. I also adds new warnings to cmake in case the CPU family was not recognized.

bernhardmgruber commented 2 years ago

Looks good so far. Now we need to make icc work on the AMD Zen3 runners: Please verify that both the operating system and the processor support Intel(R) X87, CMOV, MMX, FXSAVE, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, MOVBE, POPCNT, AVX, F16C, FMA, BMI, LZCNT and AVX2 instructions.

bernhardmgruber commented 2 years ago

Testing locally on my Ryzen (zen3) I do not have: fxsave lzcnt bmi? (zen3 has bmi1 bmi2)

bernhardmgruber commented 2 years ago

The problem was that if the target architecture was detected as zen or zen3, then we also added skylake to the list of march flags to test, which causes icc to pass -xCORE-AVX2. We fixed that now and icc should pass -xAVX2.