Repository navigation
fix(intrinsics): validate authored PTX floors against hardware introductions - #1261
Merged
Merged
Conversation
almightychang
marked this pull request as ready for review
September 13, 2026 03:18
`RECORDED_PTX_FLOORS` holds the LLVM 23 default `.version` per target and its doc marks those as backend defaults rather than CUDA facts. The lower bound a floor must clear is a different fact: the PTX ISA version in which a target spelling first became nameable. Keep it in its own table so the two cannot be confused at the use site. Entries from sm_75 onward were measured with CUDA 13.2 ptxas by assembling an empty kernel at successive `.version` spellings. Earlier entries are pinned from the PTX ISA release notes. Nothing consumes this yet; it is the input a lower-bound check on catalog floors would need (NVIDIA#1213). Signed-off-by: Sam, Joochul Chang <[email protected]>
…ions Matching overlay and recipe floors can agree on an impossible ISA claim. Require each top-level hardware floor's introduction PTX to be no newer than the authored minimum_ptx. Preserve instruction-specific floors for LLVM predicates, evidence validation and codegen fallback, and leave backend-profile route floors out of this comparison. Keep only the 13 introduction rows consumed today: sm_70/75/80/86/89/90/100 and historical sm_11/20/30/53/60/61. The older rows remain hardware facts for instructions emitted on newer GPUs; packed ALU and packed atomic native floors require sm_53 and sm_60. Unused targets and suffixes do not belong in this check's table, which stays separate from LLVM defaults. Counted bar.sync and bar.arrive had no minimum_sm for the new check to inspect. Correct their authored floors to PTX 2.0 / sm_20 per the ISA; retain barrier.* requirements and backend evidence, and regenerate. The CLI regression asserts that PTX 1.0 on sm_80 fails check with the new diagnostic; the full-catalog control passes with native and route floors preserved. Target-spec and generator tests, ABI history, and the existing LLVM per-target comparison probes pass in the Nix shell. Signed-off-by: Sam, Joochul Chang <[email protected]>
The introduction check now rejects the old SM mutations before their recipe validators run. Merely changing the expected diagnostics hides coverage of the stricter recipe requirements. Use SM mutations that remain nameable at the unchanged authored PTX version. Assert the introduction check succeeds, then require the original recipe diagnostic, so the two validation layers stay independently covered. The CLI regression still rejects PTX 1.0 on sm_80 and accepts the full catalog control. Signed-off-by: Sam, Joochul Chang <[email protected]>
nihalpasham
force-pushed
the
arch-introduction-ptx
branch
from
September 23, 2026 06:09
da5b538 to
2c471a6
Compare
Signed-off-by: nihalp <[email protected]>
nihalpasham
approved these changes
Sep 23, 2026
Collaborator
There was a problem hiding this comment.
I checked the authored floors separately from LLVM defaults and backend-profile evidence. The counted-barrier correction and the native packed-operation floors now agree with that distinction.
All 326 generator/target tests, ABI-history checks, strict Clippy and docs pass on the current-main rebase. All seven hosted workflows passed at 85e0d080; this should follow #1256 as agreed in the issue.
This addresses #1213.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Counted
bar.syncandbar.arriveclaimed PTX 1.0 despite requiring PTX 2.0 and sm_20. Correct those authored records and regenerate their outputs.The new table belongs to
cuda-target-specand remains separate from LLVM's backend-default table. Native hardware floors take precedence over project support floors for packed operations. Backend-profile evidence floors retain their existing meaning.The instruction-specific authored floor remains necessary: newer instructions can require a newer PTX version on an already-existing GPU.
Verification
85e0d080. Per the issue's agreed sequencing, land after fix(codegen): reject invalid device architecture hints on both backends #1256.Addresses #1213.