Repository navigation
Tune the aarch64 release build for neoverse-n1 - #40
Merged
Merged
Conversation
mlin
force-pushed
the
conrad/arm-mtune
branch
from
October 28, 2026 06:14
3b7a8fa to
99000df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The x86_64 release build gets its scheduling target for free:
-march=ivybridgeimplies tuning for Ivy Bridge. The aarch64 leg passes bare-march=armv8-a, so it compiles with GCC's generic scheduling model. This change gives the aarch64 leg an explicit-mtune=neoverse-n1— the Graviton2 / Ampere Altra generation that dominates ARM servers — while leaving-march=armv8-auntouched.-mtuneonly steers instruction scheduling and cost models; it never widens the instruction set, so the artifact still runs on every armv8-a machine.The Dockerfile gains an opt-in
CPU_TUNEbuild arg, empty by default; when it is empty, CFLAGS is byte-identical to today, so the x86_64 build is unchanged. The workflow's aarch64 leg passesCPU_TUNE=neoverse-n1. The Dockerfile's fail-fast guard now names both build args, so an unrecognized tune value cannot be misattributed to CPU_ARCH.One risk was whether the release compiler knows the name at all: the build uses AlmaLinux 8's GCC 8.5, and upstream GCC only added neoverse-n1 in 9.1. It does — Alma's 8.5 carries the EL8 Neoverse backports, verified in the strings of the shipped cc1 binary, which lists neoverse-n1 in its processor-name table with its compiled scheduling model. The workflow change rides in build.yml.new; CI runs once it is renamed into .github/workflows/.