Skip to content

Leverage archspec GPU detection for +cuda and +rocm variants - #53113

Draft
Aiden2244 wants to merge 3 commits into
spack:developfrom
Aiden2244:archspec/support-gpus
Draft

Aiden2244 wants to merge 3 commits into
spack:developfrom
Aiden2244:archspec/support-gpus

Conversation

@Aiden2244

@Aiden2244 Aiden2244 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Add feature to spack which uses archspec to auto-detect GPU microarchitecture identifiers for NVIDIA and AMD GPUs when the +cuda or +rocm variants are specified without versions.

This is blocked on archspec #247 which adds GPU detection capability for archspec.

TODO: At current, this works by making the +cuda and +rocm variants special cases in the solver and overriding the package defaults. This is not desirable, and the relevant logic is to be refactored into the Spack packages API.

@Aiden2244
Aiden2244 force-pushed the archspec/support-gpus branch 5 times, most recently from 7206ff0 to 9584da7 Compare October 1, 2026 16:23
@Aiden2244
Aiden2244 force-pushed the archspec/support-gpus branch from 9584da7 to 5e4c97f Compare October 6, 2026 15:50
Adds the archspec.gpu package and its detection JSON, plus the
"archspec gpu" CLI subcommand, from the archspec detect-gpus branch.
Needed by the upcoming concretizer change that uses GPUs detected on
the host as variant defaults.

Signed-off-by: Aiden McCormack <aiden.mccormack@kitware.com>
Signed-off-by: Aiden McCormack <aiden.mccormack@kitware.com>
Temporary, not for release:
- vendor.txt points at Aiden2244/archspec@e538c92 (detect-gpus branch)
  until GPU detection lands upstream in archspec
- print one line per root package that received host GPU defaults, so
  the detected GPU is visible during the demonstration

Signed-off-by: Aiden McCormack <aiden.mccormack@kitware.com>
@Aiden2244
Aiden2244 force-pushed the archspec/support-gpus branch from 5e4c97f to f9c77e1 Compare October 14, 2026 19:45

This branch has not been deployed

No deployments
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.

1 participant