Repository navigation
feat(wmma): add shared-u32 ldmatrix forms - #1236
Merged
nihalpasham merged 5 commits intoSep 6, 2026
Merged
Conversation
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
…dmatrix forms intrinsics/catalog.json's SHA-256 moved to 3df52944 with this PR's new cvta_generic_to_shared_u32 / ldmatrix_*_shared_u32 catalog entries; the book page's stamp still read the pre-PR 20bc41c2. Op/module counts are unchanged (576 ops / 42 modules), so only the stamp needed updating.
CI's per-example fmt loop reflows the three-line `unsafe { ... }` block at
src/main.rs:108 onto two lines. Whitespace only, straight output of
`cargo fmt --manifest-path .../generated_ldmatrix/Cargo.toml` under the
pinned nightly. Root `cargo fmt` never reaches the example workspaces,
which is how it slipped past.
…-address # Conflicts: # crates/mir-importer/src/translator/terminator/intrinsics/memory.rs
Collaborator
|
Reviewed and validated:
Layered three commits:
Verified here: 128 fragments + 2x32 dynamic selections on sm_120, default and Merging. |
nihalpasham
approved these changes
Sep 6, 2026
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
Add
.shared::cta.u32address forms for the classicldmatrixAPIs, so callers can convert a generic shared pointer once and keep byte-offset/swizzle arithmetic in the 32-bit PTX state-space address domain.This is the first implementation slice of #1235. It does not add the counted register-MMA carrier described there.
Changes
cvta_generic_to_shared_u32(*const u8) -> u32alongside the existing u64 descriptor-address conversionldmatrix_*_shared_u32(u32)source formsnvvm.ldmatrixoperation to carry either a compatible pointer or a.shared::cta.u32state-space addressThe large generated-file count is the repository's normal catalog-digest propagation; the semantic additions remain in the ldmatrix overlay/generator and handwritten device stubs.
Testing
just checkpasses (all formatting, Clippy, unit tests, and structural guards passed; the finalcargo deny --locked checkcould not run because this environment has nocargo-denysubcommand)cargo oxide run generated_ldmatrix --arch sm_120acargo oxide run generated_ldmatrix --emit-nvvm-ir --arch sm_120agenerated_ldmatrixoracle)Both GPU runs passed all 128 x4 fragment checks and both 32-lane dynamic-index checks on sm_120 after the API was renamed to the explicit
_shared_u32spelling.Additional targeted release tests passed for
cuda-intrinsics-gen,cuda-device,dialect-nvvm,mir-importer, andmir-lower. Targeted Clippy passed with-D warnings, including the example in the CUDA 13.3 environment.Checklist
git commit -s)