Repository navigation
Add mma.sync.aligned.m16n8k8 tf32 tensor core intrinsic - #328
Merged
Merged
Conversation
Four-layer implementation (cuda-device stub, dialect-nvvm op, mir-importer emit, mir-lower convert) of the Ampere TF32 warp MMA: mma.sync.aligned.m16n8k8.row.col.f32.tf32.tf32.f32 Register layout: 4 f32 C accumulators + 4 i32 packed A + 2 i32 packed B → 4 f32 D results. Uses convergent inline asm with register-only constraints (=f/f/r). Includes pipeline detection with near-miss rejection tests and a lowering integration test.
49 tasks done
Signed-off-by: nihalp <[email protected]>
Collaborator
|
Thanks for the PR The raw
Reviewer note: A typed TF32 wrapper can be layered above this raw primitive. This partially addresses #274. |
Signed-off-by: nihalp <[email protected]>
Signed-off-by: nihalp <[email protected]>
3 tasks done
10 tasks done
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
Adds the raw Ampere TF32 warp-level matrix multiply-accumulate operation:
This is the low-level, unsafe register atom used to build typed matrix and tile APIs. It partially addresses tracking issue #274; it does not close the issue.
What changed
cuda-devicestubmma_m16n8k8_f32_tf32.sm_80target detection.f32::to_bits()is not a TF32 conversion; usecvt.rna.tf32.f32or an equivalent TF32-producing operation.mainafter Add mma.sync.aligned.m16n8k16 f16 tensor core intrinsic #327 while retaining the complete F16 and TF32 APIs, detectors, dispatch arms, lowerings, tests, and PTX checks.Safety and TF32 contract
All 32 lanes must execute the same instruction with the same qualifiers, with no lane exited. A and B use raw
.b32TF32 register carriers in the documented lane layout. The instruction requires PTX ISA 7.0 andsm_80or newer.Testing
cargo test -p cuda-device --libcargo test -p dialect-nvvm -p mir-importer -p mir-lower(18 dialect verifier, 67 importer, 85 lowering unit, and 41 lowering integration tests passed)cargo oxide run standalone_device_fn --arch sm_80(14/14)cvt.rna.tf32.f32instructionssm_80; CUDA 13.3ptxasaccepted itsm_75compilation rejected the TF32 operation with the requiredsm_80floorChecklist
Signed-off-bytrailercrates/cuda-bindings/changes in the PR delta