AMD Zen 3 Tuning Backported To The GCC 10 Compiler

Written by Michael Larabel in AMD on 1 April 2021 at 07:25 AM EDT. 7 Comments
AMD
In the past few weeks since the introduction of the EPYC 7003 "Milan" processors there has finally been AMD Zen 3 "Znver3" tuning work that's been hurried into the GCC 11 compiler code-base ahead of its stable release in the coming weeks. That initial Zen 3 tuning work has also now been back-ported to the GCC 10 branch ahead of its next point release.

The past few weeks have seen several commits to GCC Git by SUSE's Jan Hubicka for correcting/completing the Znver3 targeting being introduced in GCC 11, which should be out later this month or early next month depending upon how the rest of the cycle plays out.

For those that aren't quick to move to major new versions of the GNU Compiler Collection, the GCC 10 branch saw on Wednesday the Znver3 tuning work back-ported.

On releases/gcc-10 is the initial Zen 3 tuning work as well as fixing for some of the latencies. Separately is also a fix to avoid the compiler crashing on -march=amd stemming as a regression from when the AMD Family 19h support was first added.


This Zen 3 tuning thus will be found in the upcoming GCC 10.3 point release. Granted, most Linux distributions don't move to new GCC point releases so easily mid-stream, so its relevance still a ways out unless you are on a rolling-release distribution, relying on a gcc-snapshot type package or third-party builds, or rolling your own compiler. Ideally moving forward we can see more punctual AMD compiler enablement for both GCC and Clang. Even before this Zen 3 tuning support was published, months prior Intel already began volleying their Alder Lake and Sapphire Rapids compiler patches, which isn't unusual as the company is often contributing their compiler patches one or two years at least prior to the processors shipping in understanding the long and fragile release cycles of these open-source compilers. Thus by the time of Intel launching new CPU models, the default compiler on the major Linux distributions tend to already have mature out-of-the-box support in place, rather than months down the road.

For those not wanting to roll your own GCC compiler build of GCC 10 or 11 for the Znver3 tuning, AMD in March did release their LLVM Clang based AOCC 3.0 compiler optimized for EPYC 7003 series.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week