Repository navigation
[WIP - Please do not review] feat(intrinsics): validate PTX floors from evidence - #1212
Closed
almightychang wants to merge 1 commit into
Closed
almightychang wants to merge 1 commit into
almightychang wants to merge 1 commit into
Conversation
Signed-off-by: Sam, Joochul Chang <[email protected]>
almightychang
marked this pull request as draft
August 30, 2026 14:35
Collaborator
|
Please submit an issue prior to opening a PR directly for any discussion. |
Contributor
Author
|
@nihalpasham |
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.
Summary
ptxasfloor probe that lowers each resolved intrinsic at its declared PTX floor, requires assembly success there, and requires rejection at the immediately preceding PTX spellingptxasand the Rust LLVMllcunverifiableinstead of manufacturing a verdictptxasPopulation and measurement
The 160 literal
minimum_ptxdeclarations inintrinsics/overlay/*.tomlsplit into 102 probeable and 58 unprobeable declarations. Resolution expands compact admission matrices, so the generator's actual validation population is larger:The measurement used:
ptxasCUDA 13.2 V13.2.51, SHA-256c0a7c9752d1a1b29310ffbb453e8b895fb09e909dcf7436fef5c2c986c1a658ellcSHA-256ca7af83e237af640fe337faff2eff49055988921933186ab5535b38addeb7b49CUDA 13.2
ptxasaccepts no target belowsm_75, and PTX 6.2 cannot namesm_75; PTX 6.3 can. The negative diagnostic is retained per record, including cases where instruction and target floors are coupled. This also meansPtxIsaRequirement::Ptx62appears unreachable with this current assembler, but this PR does not change requirement lowering.CI does not rerun this experiment. It follows the existing recorded-evidence model: the live toolkit produces committed evidence, while stock runners validate the resolved catalog against that evidence.
probe --all --skip-terminal --per-targetcontinues to work withoutptxas.Positive control
I deliberately probed
abs_bf16x2with a false PTX 7.1 declaration. The command failed because CUDA 13.2 accepted the PTX 7.0 negative probe:Legacy barrier note
The NVIDIA PTX ISA states exactly:
It also states that those register/count/arrive/red forms require
sm_20or higher. Source: NVIDIA PTX ISA 9.3, bar/barrier notes.Accordingly, the fixed-immediate
sync.tomldeclaration appears correct at PTX 1.0, while countedbar.syncandbar.arrivedeclarations appear under-declared. They are in the unprobeable population, and this PR intentionally does not editcounted_barrier.tomlorsync.tomlbecause those files are being changed concurrently.Not verified here
unverifiable.Verification
cargo test -p cuda-intrinsics-gen— 311 passedcargo run -p cuda-intrinsics-gen -- checkgit diff --checkprobe-floorsrun using CUDA 13.2.51