archdetect: detect Granite Rapids via CPU model when flags match Sapphire Rapids - #299
Conversation
…hire Rapids eessi_archdetect.sh selects a microarchitecture purely from CPU feature flags. Intel Granite Rapids (Xeon 6) exposes the same visible /proc/cpuinfo flags as Sapphire/Emerald Rapids - its new features such as amx_fp16 are hidden by the kernel - so the flag match lands on x86_64/intel/sapphirerapids. Refine that match using the CPU model number, the only reliable Granite Rapids discriminator on Linux: once the flag match yields sapphirerapids, check the model and prepend x86_64/intel/graniterapids on family 6 / model 173 (0xAD, GNR-SP/AP) or 174 (0xAE, GNR-D). Non-breaking: cpupath -a returns a priority-ordered fallback chain and downstream subdir resolution selects the first path that exists, so Granite Rapids transparently falls back to sapphirerapids until a graniterapids build is shipped. Sapphire Rapids (model 143) and Emerald Rapids (model 207) are unaffected. Add a test fixture captured from a real Azure Standard_D2s_v7 (Intel Xeon 6973P-C, family 6 model 173). Verified on real Granite Rapids silicon and against the full archdetect fixture suite. Bump VERSION to 1.3.0.
… numbers Address review feedback from @boegel: document the model-number -> microarch mapping (family 6, models 0xAD/0xAE) with its source - the kernel's arch/x86/include/asm/intel-family.h (INTEL_GRANITERAPIDS_X/_D via IFM()).
|
Go for it; just flagged it as draft, so we would have the right discussion around it...
…________________________________
From: Bob Dröge ***@***.***>
Sent: Wednesday, September 9, 2026 9:31 AM
To: EESSI/software-layer-scripts ***@***.***>
Cc: Hugo Meiland ***@***.***>; Mention ***@***.***>
Subject: Re: [EESSI/software-layer-scripts] archdetect: detect Granite Rapids via CPU model when flags match Sapphire Rapids (PR #299)
@bedroge approved this pull request.
Lgtm (at least as a temporary workaround until we find a better way to solve this), thanks @hmeiland<https://github.com/hmeiland>!
You marked the PR as draft; is there anything you were still planning to change, or can we deploy this?
—
Reply to this email directly, view it on GitHub<#299?email_source=notifications&email_token=AHWFPJ3YIQS3DLGQ6RLOCDD5OEBMLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMJVGEYTENJZGMZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#pullrequestreview-5151125932>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHWFPJ3TDSWKXFJ7TKKRSX35OEBMLAVCNFSNUABFKJSXA33TNF2G64TZHM4TSNZTHE4DMMZWHNEXG43VMU5TKMZTHEZTCOBVHE42C5QC>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/AHWFPJ3LTRYEBZQV2R7GJSD5OEBMLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMJVGEYTENJZGMZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android<https://github.com/notifications/mobile/android/AHWFPJZUVXUTVJCUQVTVE4L5OEBMLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMJVGEYTENJZGMZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
bot: build repo:eessi.io-2023.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
|
New job on instance
|
|
This has been ingested for all three EESSI versions. |
|
@bedroge Do we have a follow-up issue open, since automatic fallback to If not, can you create one (and link it here)? |
|
Done, see #303. |
Summary
init/eessi_archdetect.shselects a CPU microarchitecture purely from the feature flags in/proc/cpuinfo. Intel Granite Rapids (Xeon 6) exposes the same visible flags as Sapphire/Emerald Rapids - its additions (e.g.amx_fp16,amx_complex) are intentionally hidden by the Linux kernel - so the flag match lands onx86_64/intel/sapphirerapids.This PR adds a small, targeted refinement: once the flag match yields
sapphirerapids, disambiguate using the CPU model number (the only reliable Granite Rapids signal on Linux) and prependx86_64/intel/graniterapidsto the match chain on:0xAD0xAEWhy it's non-breaking
cpupath -areturns a priority-ordered fallback chain, and downstream software-subdir resolution picks the first entry that actually exists in the repo. Until agraniterapidssoftware subdir is published, Granite Rapids transparently falls back tosapphirerapids(next in the chain). Sapphire Rapids (model 143) and Emerald Rapids (model 207) are unaffected - they don't match 173/174 and continue to resolve tosapphirerapids.Testing
tests/archdetect/x86_64/intel/graniterapids/Azure-Ubuntu24-6973P-C.{cpuinfo,output,all.output}, captured from a real AzureStandard_D2s_v7(Intel Xeon 6973P-C, family 6 / model 173).eessi_archdetect.sh cpupath->x86_64/intel/graniterapidseessi_archdetect.sh -a cpupath->x86_64/intel/graniterapids:x86_64/intel/sapphirerapids:x86_64/intel/icelake:x86_64/intel/cascadelake:x86_64/intel/skylake_avx512:x86_64/intel/haswell:x86_64/generictests/archdetectfixture: all pass, no regressions (Sapphire Rapids still ->sapphirerapids).VERSIONbumped1.2.0->1.3.0.Notes
Granite Rapids has no dedicated software subdir in EESSI yet; this change makes archdetect ready to pick it up the moment one is added, and meanwhile keeps GNR on the correct
sapphirerapidsfallback. The model list generalises cleanly to future parts (e.g. a Diamond Rapids entry) should the same flag-aliasing recur.