Skip to content

modules/cuda: completely revamp microarchitecture handling#16002

Open
SoapGentoo wants to merge 1 commit into
mesonbuild:masterfrom
SoapGentoo:revamp-cuda
Open

modules/cuda: completely revamp microarchitecture handling#16002
SoapGentoo wants to merge 1 commit into
mesonbuild:masterfrom
SoapGentoo:revamp-cuda

Conversation

@SoapGentoo

Copy link
Copy Markdown
Member

Replace the per-CUDA-version architecture lists with a declarative table of support windows (min/max CUDA version per micro-ISA). There's a clean separation between version bounds and logic, and once a new arch like Rubin comes out, it's a table entry instead of a change to complex intertwined logic.

User-visible changes:

  • support the specifiers introduced with CUDA 12.8/12.9: architecture-specific 'X.Ya' ('Hopper(A)', '12.0a', ...) and family-specific 'X.Yf' ('10.0f', ...), plus the Thor and newer Blackwell parts
  • min_driver_version() table extended through CUDA 13.3
  • '+PTX' is now rejected for architecture-specific ('a') targets, which have no forward compatibility
  • warnings distinguish "CUDA too old for arch" from "arch dropped from CUDA"

@dcbaker dcbaker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd need to think some more about the what's going on here, but here's a few high level review comments.

Comment thread mesonbuild/modules/cuda.py Outdated
Comment thread mesonbuild/modules/cuda.py Outdated
Comment thread mesonbuild/modules/cuda.py Outdated
@SoapGentoo

SoapGentoo commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@dcbaker there's a lot going on I know, but I feel the current interleaving of logic and definitions isn't working anymore, and with the a/f tuples, things got a whole lot worse. I've tested this code a lot (and found more edge cases while doing so), but I'd say it's still a lot cleaner than before.

@dcbaker

dcbaker commented Jul 13, 2026

Copy link
Copy Markdown
Member

I don't disagree, I just have to get my head back around the existing code and then around your code as well.

Replace the per-CUDA-version architecture lists with a declarative
table of support windows (min/max CUDA version per micro-ISA). There's
a clean separation between version bounds and logic, and once a new
arch like Rubin comes out, it's a table entry instead of a change to
complex intertwined logic.

User-visible changes:
- support the specifiers introduced with CUDA 12.8/12.9:
  architecture-specific 'X.Ya' ('Hopper(A)', '12.0a', ...) and
  family-specific 'X.Yf' ('10.0f', ...), plus the Thor and newer
  Blackwell parts
- min_driver_version() table extended through CUDA 13.3
- '+PTX' is now rejected for architecture-specific ('a') targets,
  which have no forward compatibility
- warnings distinguish "CUDA too old for arch" from "arch dropped
  from CUDA"
@dcbaker dcbaker added this to the 1.13 milestone Jul 21, 2026
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