Skip to content

archdetect: detect Granite Rapids via CPU model when flags match Sapphire Rapids - #299

Merged
bedroge merged 3 commits into
EESSI:mainfrom
hmeiland:archdetect-granite-rapids
Sep 9, 2026
Merged

archdetect: detect Granite Rapids via CPU model when flags match Sapphire Rapids#299
bedroge merged 3 commits into
EESSI:mainfrom
hmeiland:archdetect-granite-rapids

Conversation

@hmeiland

@hmeiland hmeiland commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

init/eessi_archdetect.sh selects 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 on x86_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 prepend x86_64/intel/graniterapids to the match chain on:

Model Hex Part
173 0xAD Granite Rapids-SP / -AP
174 0xAE Granite Rapids-D

Why it's non-breaking

cpupath -a returns a priority-ordered fallback chain, and downstream software-subdir resolution picks the first entry that actually exists in the repo. Until a graniterapids software subdir is published, Granite Rapids transparently falls back to sapphirerapids (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 to sapphirerapids.

Testing

  • New fixture tests/archdetect/x86_64/intel/graniterapids/Azure-Ubuntu24-6973P-C.{cpuinfo,output,all.output}, captured from a real Azure Standard_D2s_v7 (Intel Xeon 6973P-C, family 6 / model 173).
  • Verified on real Granite Rapids silicon:
    • eessi_archdetect.sh cpupath -> x86_64/intel/graniterapids
    • eessi_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/generic
  • Full local run of every tests/archdetect fixture: all pass, no regressions (Sapphire Rapids still -> sapphirerapids).

VERSION bumped 1.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 sapphirerapids fallback. The model list generalises cleanly to future parts (e.g. a Diamond Rapids entry) should the same flag-aliasing recur.

…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.
Comment thread init/eessi_archdetect.sh Outdated
… 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()).

@bedroge bedroge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm (at least as a temporary workaround until we find a better way to solve this), thanks @hmeiland!

You marked the PR as draft; is there anything you were still planning to change, or can we deploy this?

@hmeiland

hmeiland commented Sep 9, 2026 via email

Copy link
Copy Markdown
Contributor Author

@bedroge
bedroge marked this pull request as ready for review September 9, 2026 07:33
@bedroge

bedroge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

bot: build repo:eessi.io-2023.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx
bot: build repo:eessi.io-2026.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx

@eessi-bot-deucalion

eessi-bot-deucalion Bot commented Sep 9, 2026

Copy link
Copy Markdown

New job on instance eessi-bot-deucalion for repository eessi.io-2023.06-software
Building on: a64fx
Building for: aarch64/a64fx
Job dir: /home/eessibot/new-bot/jobs/2026.09/pr_299/1902398

date job status comment
Sep 09 07:41:22 UTC 2026 submitted job id 1902398 awaits release by job manager
Sep 09 07:42:12 UTC 2026 released job awaits launch by Slurm scheduler
Sep 09 07:43:18 UTC 2026 running job 1902398 is running
Sep 09 07:49:03 UTC 2026 finished
😁 SUCCESS (click triangle for details)
Details
✅ job output file slurm-1902398.out
✅ no message matching FATAL:
✅ no message matching ERROR:
✅ no message matching FAILED:
✅ no message matching required modules missing:
✅ found message(s) matching No missing installations
✅ found message matching .tar.* created!
Artefacts
eessi-2023.06-software-linux-aarch64-a64fx-17889400620.tar.zstsize: 0 MiB (4285 bytes)
entries: 1
modules under 2023.06/software/linux/aarch64/a64fx/modules/all
no module files in tarball
software under 2023.06/software/linux/aarch64/a64fx/software
no software packages in tarball
reprod directories under 2023.06/software/linux/aarch64/a64fx/reprod
no reprod directories in tarball
other under 2023.06/software/linux/aarch64/a64fx
no other files in tarball
Sep 09 07:49:03 UTC 2026 test result
😢 FAILURE (click triangle for details)
Reason
EESSI test suite was not run, test step itself failed to execute.
Details
✅ job output file slurm-1902398.out
❌ found message matching ERROR:
✅ no message matching [\s*FAILED\s*].*Ran .* test case
Sep 09 08:12:26 UTC 2026 uploaded transfer of eessi-2023.06-software-linux-aarch64-a64fx-17889400620.tar.zst to S3 bucket succeeded

@eessi-bot-deucalion

eessi-bot-deucalion Bot commented Sep 9, 2026

Copy link
Copy Markdown

New job on instance eessi-bot-deucalion for repository eessi.io-2025.06-software
Building on: a64fx
Building for: aarch64/a64fx
Job dir: /home/eessibot/new-bot/jobs/2026.09/pr_299/1902399

date job status comment
Sep 09 07:41:28 UTC 2026 submitted job id 1902399 awaits release by job manager
Sep 09 07:42:08 UTC 2026 released job awaits launch by Slurm scheduler
Sep 09 07:43:20 UTC 2026 running job 1902399 is running
Sep 09 07:47:56 UTC 2026 finished
😁 SUCCESS (click triangle for details)
Details
✅ job output file slurm-1902399.out
✅ no message matching FATAL:
✅ no message matching ERROR:
✅ no message matching FAILED:
✅ no message matching required modules missing:
✅ found message(s) matching No missing installations
✅ found message matching .tar.* created!
Artefacts
eessi-2025.06-software-linux-aarch64-a64fx-17889400210.tar.zstsize: 0 MiB (4285 bytes)
entries: 1
modules under 2025.06/software/linux/aarch64/a64fx/modules/all
no module files in tarball
software under 2025.06/software/linux/aarch64/a64fx/software
no software packages in tarball
reprod directories under 2025.06/software/linux/aarch64/a64fx/reprod
no reprod directories in tarball
other under 2025.06/software/linux/aarch64/a64fx
no other files in tarball
Sep 09 07:47:56 UTC 2026 test result
😢 FAILURE (click triangle for details)
Reason
EESSI test suite was not run, test step itself failed to execute.
Details
✅ job output file slurm-1902399.out
❌ found message matching ERROR:
✅ no message matching [\s*FAILED\s*].*Ran .* test case
Sep 09 08:12:45 UTC 2026 uploaded transfer of eessi-2025.06-software-linux-aarch64-a64fx-17889400210.tar.zst to S3 bucket succeeded

@eessi-bot-deucalion

eessi-bot-deucalion Bot commented Sep 9, 2026

Copy link
Copy Markdown

New job on instance eessi-bot-deucalion for repository eessi.io-2026.06-software
Building on: a64fx
Building for: aarch64/a64fx
Job dir: /home/eessibot/new-bot/jobs/2026.09/pr_299/1902400

date job status comment
Sep 09 07:41:33 UTC 2026 submitted job id 1902400 awaits release by job manager
Sep 09 07:42:05 UTC 2026 released job awaits launch by Slurm scheduler
Sep 09 07:43:23 UTC 2026 running job 1902400 is running
Sep 09 07:47:58 UTC 2026 finished
😁 SUCCESS (click triangle for details)
Details
✅ job output file slurm-1902400.out
✅ no message matching FATAL:
✅ no message matching ERROR:
✅ no message matching FAILED:
✅ no message matching required modules missing:
✅ found message(s) matching No missing installations
✅ found message matching .tar.* created!
Artefacts
eessi-2026.06-software-linux-aarch64-a64fx-17889398970.tar.zstsize: 0 MiB (4278 bytes)
entries: 1
modules under 2026.06/software/linux/aarch64/a64fx/modules/all
no module files in tarball
software under 2026.06/software/linux/aarch64/a64fx/software
no software packages in tarball
reprod directories under 2026.06/software/linux/aarch64/a64fx/reprod
no reprod directories in tarball
other under 2026.06/software/linux/aarch64/a64fx
no other files in tarball
Sep 09 07:47:58 UTC 2026 test result
😢 FAILURE (click triangle for details)
Reason
EESSI test suite was not run, test step itself failed to execute.
Details
✅ job output file slurm-1902400.out
❌ found message matching ERROR:
✅ no message matching [\s*FAILED\s*].*Ran .* test case
Sep 09 08:12:36 UTC 2026 uploaded transfer of eessi-2026.06-software-linux-aarch64-a64fx-17889398970.tar.zst to S3 bucket succeeded

@bedroge

bedroge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This has been ingested for all three EESSI versions.

@bedroge
bedroge merged commit 5ade683 into EESSI:main Sep 9, 2026
91 checks passed
@boegel

boegel commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@bedroge Do we have a follow-up issue open, since automatic fallback to graniterapids from a newer Intel CPU won't work with this in place (which is fine short term, but should be avoided if possible long term)?

If not, can you create one (and link it here)?

@bedroge

bedroge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Done, see #303.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants