AMD Sends Out Follow-Up Zen 4 Patch For The GCC Compiler
Following Znver4 being added to GCC 13 at the end of October albeit a basic implementation, out this week is a follow-up patch to begin making more adaptations to the AMD Zen 4 target.
The initial Znver4 support that was merged to the GCC compiler added Zen 4's new instructions now supported by these new Ryzen 7000 and EPYC 9004 series processors but didn't yet do anything in the way of tuning and carried over the cost table from Zen 3. Optimizing that support is now being worked on by AMD engineers.
The new patch out this week adds the Zen 4 instruction reservations for better adapting the Znver4 scheduling for the hardware. AMD's Tejas Sanjay Joshi wrote with the patch:
GCC 13 feature development is over and now onto its bug fixing phase but given that Znver4 is new to GCC 13, it shouldn't risk regressing existing support and so presumably this patch -- and any other forthcoming work -- will continue to land for helping out Zen 4 support on GCC 13.
GCC 13 with this initial Zen 4 support in turn should be out as stable around March~April. Or for those wanting optimized Zen 4 compiler support right now, there is AMD's AOCC 4.0 compiler built atop LLVM/Clang.
The initial Znver4 support that was merged to the GCC compiler added Zen 4's new instructions now supported by these new Ryzen 7000 and EPYC 9004 series processors but didn't yet do anything in the way of tuning and carried over the cost table from Zen 3. Optimizing that support is now being worked on by AMD engineers.
AMD EPYC "Genoa" Zen 4 processor.
The new patch out this week adds the Zen 4 instruction reservations for better adapting the Znver4 scheduling for the hardware. AMD's Tejas Sanjay Joshi wrote with the patch:
PFA the patch which adds znver4 instruction reservations separately from older znver versions:
* This also models separate div, fdiv and ssediv units accordingly.
* Does not blow-up the insn-automata.cc size (it grew from 201502 to 206141 for me.)
* The patch successfully builds, bootstraps, and passes make check.
* I have also run spec, showing no regressions for 1-copy 3-iteration runs. However, I observe 1.5% gain for 507.cactuBSSN_r.
Is it ok for trunk?
GCC 13 feature development is over and now onto its bug fixing phase but given that Znver4 is new to GCC 13, it shouldn't risk regressing existing support and so presumably this patch -- and any other forthcoming work -- will continue to land for helping out Zen 4 support on GCC 13.
GCC 13 with this initial Zen 4 support in turn should be out as stable around March~April. Or for those wanting optimized Zen 4 compiler support right now, there is AMD's AOCC 4.0 compiler built atop LLVM/Clang.
1 Comment