Skip to content

Tune the aarch64 release build for neoverse-n1 - #40

Merged
mlin merged 6 commits into
mlin:mainfrom
Wid-L-Hacker:conrad/arm-mtune
Oct 28, 2026
Merged

mlin merged 6 commits into
mlin:mainfrom
Wid-L-Hacker:conrad/arm-mtune

Conversation

@Wid-L-Hacker

Copy link
Copy Markdown
Contributor

The x86_64 release build gets its scheduling target for free: -march=ivybridge implies 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-a untouched. -mtune only 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_TUNE build 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 passes CPU_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/.

@mlin
mlin force-pushed the conrad/arm-mtune branch from 3b7a8fa to 99000df Compare October 28, 2026 06:14
@mlin
mlin merged commit afc59da into mlin:main Oct 28, 2026
7 checks passed
@mlin
mlin deleted the conrad/arm-mtune branch October 28, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants