GCC 12 Shifting To Stage 4 Development - No Sign Of AMD Zen 4 Support
The GNU Compiler Collection (GCC) that serves as the default system compiler on most Linux distributions is nearing its annual update with GCC 12. GCC 12 has been in a general bug fixing period since November while beginning next week will be onto its final phase of focusing just on regression and documentation fixes to the compiler.
GCC 12 release manager Richard Biener announced that the general bug fixing "stage 3" period will end on 16 January followed by the stage 4 period of just regression/documentation fixing. At the moment there are about 30 P1 regressions of the highest priority, 307 P2 regressions, and 279 P3 regressions.
Over the past year of development GCC 12 has picked up support for the latest Intel and Arm processors, support for using the Mold linker, x86 straight-line speculation mitigations, RISC-V architecture improvements, Armv9-A enablement, auto vectorization at the -O2 optimization level, AVX-512 FP16 support, improved static analyzer, and much more.
With GCC 12 there has been continued work on bringing up new features of next-generation Intel CPUs -- just as we are used to seeing for many years with Intel's punctual compiler support -- especially with the big new Advanced Matrix Extensions (AMX) and other features coming. There's also been more tuning for Alder Lake and other enhancements. Meanwhile it was back in mid-2020 for GCC 11 where Intel introduced the initial Sapphire Rapids and Alder Lake compiler targets and over the course of 2021 was ironing out AMX and other features. Sapphire Rapids isn't ramping up for a few months while it's initial "-march=sapphirerapids" targeting and various compiler changes have been out in the GCC compiler for nearly two years while the stable GCC 11 release was last year and then now on the heels of releasing GCC 12.
With Intel's open-source compiler support track record both for GCC and LLVM/Clang, it's thus unfortunate to report that there is still nothing to report on Zen 4 "znver4" in GCC 12. Given the timing it doesn't look like GCC 12.1 releasing around the end of Q1 will contain any early Zen 4 support, which is a shame given GCC's annual cadence for major releases and even if/when it gets introduced to GCC (13) mainline and then back-ported to a GCC 12 point release, most Linux distributions don't switch over to new system compiler point releases in the middle of their own release cycles... Thus we are looking at a situation where when Zen 4 processors are shipping later this year, there won't be widespread mainline compiler support in what's shipping by the Linux distributions. Granted, most users outside of HPC and enthusiasts running Arch and Gentoo aren't too concerned about optimized compiler targeting, but unfortunate when considering Intel's punctuality -- hell even Arm has been striking well lately with their punctual mainline compiler support.
It's with Ubuntu 22.10 in the fall where they will finally be shipping GCC 12 as their default compiler, Fedora 36 in the spring will be among the first major Linux distributions shipping this new compiler, and other distributions follow throughout the course of the year moving to this annual GCC release.
Last year AMD managed to get Zen 3 added to GCC 11 by lucky timing. AMD again relied on their SUSE partners for bringing up Zen 3 but hadn't posted the znver3 bring-up patches until the EPYC 7003 "Milan" launch last March. So in the short time between the Milan launch and GCC 11.1 shipping, znver3 patches squeezed in only at the last minute and with the SUSE developers involved being at the head of GCC development and the znver3 changes not risking regressing existing users. But even with initial Znver3 for GCC 11, it wasn't until October with Ubuntu 21.10 where it shifted to that compiler by default. Given Zen 4 processors aren't expected until later in the year, it doesn't look like something similar will happen with last-minute Znver4 in GCC 12... AMD's behavior likely stems from its time as an underdog when they reduced their open-source/Linux staffing and refrained from putting out compiler patches too early to avoid confirming what new instruction set extensions / features are supported by their upcoming hardware. Going back closer to two decades they were more timely and I still have mousepads from AMD where they promoted their Open64/GCC compiler "-march=" flags for Opteron processors of the time with timely compiler support.
AMD for their part has been putting out same-day updates to their LLVM Clang based AMD Optimizing C/C++ Compiler (AOCC) when introducing new processor families, which seems to appease HPC users and their big enterprise customers. Though AOCC hasn't been exciting Linux desktop enthusiasts like Arch and Gentoo power users who are often very vocal about their computing choices and those not interested in AOCC for being a binary-only compiler release catering to just enterprise Linux distributions. So just unfortunate they don't have timely support in the mainline open-source compilers like the Alder Lake and Sapphire Rapids support that has been maturing in the open with released compilers for the past year. Hopefully they will manage a nicer rhythm in the future as Intel (and Arm) clearly see benefits to their existing ways. Needless to say, no Znver4 signs yet either on the LLVM/Clang side which at least is on a six month release regiment.
GCC 12 release manager Richard Biener announced that the general bug fixing "stage 3" period will end on 16 January followed by the stage 4 period of just regression/documentation fixing. At the moment there are about 30 P1 regressions of the highest priority, 307 P2 regressions, and 279 P3 regressions.
Over the past year of development GCC 12 has picked up support for the latest Intel and Arm processors, support for using the Mold linker, x86 straight-line speculation mitigations, RISC-V architecture improvements, Armv9-A enablement, auto vectorization at the -O2 optimization level, AVX-512 FP16 support, improved static analyzer, and much more.
With GCC 12 there has been continued work on bringing up new features of next-generation Intel CPUs -- just as we are used to seeing for many years with Intel's punctual compiler support -- especially with the big new Advanced Matrix Extensions (AMX) and other features coming. There's also been more tuning for Alder Lake and other enhancements. Meanwhile it was back in mid-2020 for GCC 11 where Intel introduced the initial Sapphire Rapids and Alder Lake compiler targets and over the course of 2021 was ironing out AMX and other features. Sapphire Rapids isn't ramping up for a few months while it's initial "-march=sapphirerapids" targeting and various compiler changes have been out in the GCC compiler for nearly two years while the stable GCC 11 release was last year and then now on the heels of releasing GCC 12.
With Intel's open-source compiler support track record both for GCC and LLVM/Clang, it's thus unfortunate to report that there is still nothing to report on Zen 4 "znver4" in GCC 12. Given the timing it doesn't look like GCC 12.1 releasing around the end of Q1 will contain any early Zen 4 support, which is a shame given GCC's annual cadence for major releases and even if/when it gets introduced to GCC (13) mainline and then back-ported to a GCC 12 point release, most Linux distributions don't switch over to new system compiler point releases in the middle of their own release cycles... Thus we are looking at a situation where when Zen 4 processors are shipping later this year, there won't be widespread mainline compiler support in what's shipping by the Linux distributions. Granted, most users outside of HPC and enthusiasts running Arch and Gentoo aren't too concerned about optimized compiler targeting, but unfortunate when considering Intel's punctuality -- hell even Arm has been striking well lately with their punctual mainline compiler support.
It's with Ubuntu 22.10 in the fall where they will finally be shipping GCC 12 as their default compiler, Fedora 36 in the spring will be among the first major Linux distributions shipping this new compiler, and other distributions follow throughout the course of the year moving to this annual GCC release.
Last year AMD managed to get Zen 3 added to GCC 11 by lucky timing. AMD again relied on their SUSE partners for bringing up Zen 3 but hadn't posted the znver3 bring-up patches until the EPYC 7003 "Milan" launch last March. So in the short time between the Milan launch and GCC 11.1 shipping, znver3 patches squeezed in only at the last minute and with the SUSE developers involved being at the head of GCC development and the znver3 changes not risking regressing existing users. But even with initial Znver3 for GCC 11, it wasn't until October with Ubuntu 21.10 where it shifted to that compiler by default. Given Zen 4 processors aren't expected until later in the year, it doesn't look like something similar will happen with last-minute Znver4 in GCC 12... AMD's behavior likely stems from its time as an underdog when they reduced their open-source/Linux staffing and refrained from putting out compiler patches too early to avoid confirming what new instruction set extensions / features are supported by their upcoming hardware. Going back closer to two decades they were more timely and I still have mousepads from AMD where they promoted their Open64/GCC compiler "-march=" flags for Opteron processors of the time with timely compiler support.
AMD for their part has been putting out same-day updates to their LLVM Clang based AMD Optimizing C/C++ Compiler (AOCC) when introducing new processor families, which seems to appease HPC users and their big enterprise customers. Though AOCC hasn't been exciting Linux desktop enthusiasts like Arch and Gentoo power users who are often very vocal about their computing choices and those not interested in AOCC for being a binary-only compiler release catering to just enterprise Linux distributions. So just unfortunate they don't have timely support in the mainline open-source compilers like the Alder Lake and Sapphire Rapids support that has been maturing in the open with released compilers for the past year. Hopefully they will manage a nicer rhythm in the future as Intel (and Arm) clearly see benefits to their existing ways. Needless to say, no Znver4 signs yet either on the LLVM/Clang side which at least is on a six month release regiment.
7 Comments