GCC 10 Compiler Picks Up New Scheduler Model & Cost Tables For AMD Zen 2 Processors
While AMD developers published their "Znver2" compiler patches for Zen 2 originally back in November, months ahead of the recent Ryzen 3000 series launch, this compiler support was incomplete as it re-used the existing scheduler model and costs table of Znver1. Now though one of SUSE's compiler experts who often works in cooperation with AMD has published the new Znver2 scheduler model and costs table for Zen 2.
The updated costs table better reflects the "costs" of moving and loading various registers and different instructions compared to Znver1 so the compiler can make wiser decisions for the most efficient usage. With these updated costs to reflect faster multiplication and 256 vector paths, there is better GNU C Library performance in particular and SUSE developer Jan Hubicka noted that the memory copy performance "wins" even for small blocks.
The Zen 2 scheduler model is largely based on the Zen 1 model is refined to better match AMD's new microarchitecture. Hubicka noted though there is little effect on overall performance but I'll certainly be firing off my complete benchmark set shortly.
The initial "Znver2" support made it into GCC 9 as released earlier this year and on the LLVM/Clang side into version 9.0. That timing alone is a bit less than ideal considering LLVM 9.0 isn't being released until next month and the GCC 9.1 compiler shipped in May and thus not yet found in the likes of the latest Ubuntu stable releases, so those early customers of AMD Zen 2 processors are missing out on this optimized support unless using a rolling-release Linux distribution or rolling their own compiler. But beyond that, it's been missing out on the reworked scheduler model and updated costs table for the Zen 2 microarchitecture. Now in turn, while that hit the GCC code-base today it won't be found in a released version of the GNU Compiler Collection until GCC 10.1 releasing in April~May of 2020 or LLVM 10.0 on the Clang side in February~March.
Getting out the updated compiler support well ahead of launch has been an area where Intel has been very punctual over the years in realizing the (performance) benefits to getting their compiler support available and tuned so that by the time their processors are shipping the supported compilers are found throughout the Linux ecosystem for ensuring optimal performance and also seeing all new instruction set extensions are available. Hopefully with time AMD will be able to improve this process and provide more timely compiler support; it's certainly something I've been bringing up with AMD several times this year. Even with today's scheduler model and cost table work, it still appears GCC and Clang lack support for some Zen 2 extensions like RDPRU.
I'll be firing up some fresh Znver2 compiler benchmarks on the Ryzen 9 3900X shortly.
The updated costs table better reflects the "costs" of moving and loading various registers and different instructions compared to Znver1 so the compiler can make wiser decisions for the most efficient usage. With these updated costs to reflect faster multiplication and 256 vector paths, there is better GNU C Library performance in particular and SUSE developer Jan Hubicka noted that the memory copy performance "wins" even for small blocks.
The Zen 2 scheduler model is largely based on the Zen 1 model is refined to better match AMD's new microarchitecture. Hubicka noted though there is little effect on overall performance but I'll certainly be firing off my complete benchmark set shortly.
The initial "Znver2" support made it into GCC 9 as released earlier this year and on the LLVM/Clang side into version 9.0. That timing alone is a bit less than ideal considering LLVM 9.0 isn't being released until next month and the GCC 9.1 compiler shipped in May and thus not yet found in the likes of the latest Ubuntu stable releases, so those early customers of AMD Zen 2 processors are missing out on this optimized support unless using a rolling-release Linux distribution or rolling their own compiler. But beyond that, it's been missing out on the reworked scheduler model and updated costs table for the Zen 2 microarchitecture. Now in turn, while that hit the GCC code-base today it won't be found in a released version of the GNU Compiler Collection until GCC 10.1 releasing in April~May of 2020 or LLVM 10.0 on the Clang side in February~March.
Getting out the updated compiler support well ahead of launch has been an area where Intel has been very punctual over the years in realizing the (performance) benefits to getting their compiler support available and tuned so that by the time their processors are shipping the supported compilers are found throughout the Linux ecosystem for ensuring optimal performance and also seeing all new instruction set extensions are available. Hopefully with time AMD will be able to improve this process and provide more timely compiler support; it's certainly something I've been bringing up with AMD several times this year. Even with today's scheduler model and cost table work, it still appears GCC and Clang lack support for some Zen 2 extensions like RDPRU.
I'll be firing up some fresh Znver2 compiler benchmarks on the Ryzen 9 3900X shortly.
3 Comments