AMD AOCC Performance On EPYC 7773X Milan-X Against GCC, Clang Compilers
Last month with the AMD EPYC 7773X Linux benchmarks and Milan-X in the Azure cloud I showed the impressive capabilities of AMD's new Milan-X processors with 768MB of L3 cache per socket (1.5GB cache per 2P server!) for a range of workloads. All of that initial benchmarking as usual was done using the default GCC system compiler across all tested AMD/Intel processors. Of course, there also exists AMD's Optimizing C/C++ Compiler (AOCC) as a downstream of LLVM/Clang with various Zen optimization patches applied. Curious about the AOCC impact for Milan-X, here are some benchmarks looking at the EPYC 7773X 2P performance across AOCC, GCC, and LLVM Clang.
With Ubuntu 22.04 LTS being released next week and that being the next major enterprise Linux release, that remains the operating system in use for these forward-looking benchmarks. Ubuntu 22.04 LTS defaults to using the Linux 5.15 LTS kernel and on the compiler side uses GCC 11.2 by default and also has the recently released LLVM Clang 14.0 in its archive as the default "clang" package. GCC 11.2 released last year has all the Zen 3 patches in GCC unlike the GCC 9 compiler used by Ubuntu 20.04 LTS -- plus a lot of other C/C++ improvements and other compiler improvements at large. GCC 12 will see its stable release in the coming weeks but is obviously out-of-reach for Ubuntu 22.04 LTS but will be the default compiler come Ubuntu 22.10 in October.
So with the Ubuntu 22.04 LTS focus, its default GCC 11.2 and LLVM/Clang 14.0 compilers were the tested compilers on that front in this Milan-X benchmarking. On the AOCC side, AMD AOCC 3.2 remains the latest compiler release from last December and is based on upstream LLVM/Clang 13.0. Back during the Milan-X media briefing I inquired whether AMD had any plans for an updated compiler alongside the Milan-X launch, which they did not. In fact, it was mentioned, they likely won't have a new AOCC release until their next-generation (Zen 4) processors. That's a bit surprising assuming the Zen 4 processors won't debut until late in the year and LLVM/Clang 14.0 already having been released as stable as the latest half-year update to the compiler. With LLVM/Clang 14.0 there is the mainlining of BOLT, a lot of continued work on Flang for better Fortran support, and just a lot of improvements in general. So it's a bit surprising if they aren't planning on at least an AOCC 3 re-base in the interim but otherwise that will just make for a massive AOCC 4.0 compiler release (AOCC 4.0 assuming their versioning practice holds true) when the next-gen CPUs ship. While not related to Milan-X but as a general note, unlike Intel's practices in getting compiler support for new CPU targets upstreamed well in advance of launch, so far there is no upstream Zen 4 [znver4] support in either GCC or LLVM/Clang.
So with today's compiler testing on AMD EPYC 7773X 2P it's looking at the performance of GCC 11.2 and LLVM Clang 14.0 from Ubuntu 22.04 "Jammy Jellyfish" archive against AMD's AOCC 3.2 compiler as its latest release there. Across all testing the CFLAGS/CXXFLAGS were set to "-O3 -march=native -flto" for the open-source benchmarks being built on this Milan-X 2P server configuration using AMD's Daytona reference server platform.
No other changes were made during testing besides swapping out the underlying compiler used for building the benchmarks/software under test.