Repository navigation
Add mma.sync.aligned.m16n8k16 f16 tensor core intrinsic - #327
Merged
Merged
Conversation
Adds the FP16 variant of the Ampere mma.sync instruction, following the same register-only 4-layer pattern established by the BF16 (NVIDIA#321) and F64 (NVIDIA#323) MMA variants: cuda-device stub → dialect-nvvm op → mir-importer emit → mir-lower convert The F16 variant has identical register geometry to BF16 (4 f32 C/D, 4 i32 packed A, 2 i32 packed B = 10 operands, 4 results) and uses the same inline-asm constraints (=f,=f,=f,=f,f,f,f,f,r,r,r,r,r,r). Pipeline detection, lowering tests, and near-miss rejection tests are included.
49 tasks done
Signed-off-by: nihalp <[email protected]>
Collaborator
|
Thanks for the PR. I pushed a few minor updates
Reviewer note: This partially addresses #274. |
Signed-off-by: nihalp <[email protected]>
11 of 13 tasks
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 F16 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_m16n8k16_f32_f16.sm_80target detection.Safety and register contract
All 32 lanes must execute the same instruction with the same qualifiers, with no lane exited. A and B are raw
.b32carriers containing two F16 values each in low-to-high order. Passing another lane layout computes a different matrix operation. The instruction requires PTX ISA 7.0 andsm_80or newer.Testing
cargo test -p cuda-device --libcargo test -p dialect-nvvm --all-targets(17 passed)cargo test -p mir-importer --lib(66 passed)cargo test -p mir-lower --all-targets(85 unit + 40 integration passed)cargo oxide run standalone_device_fn --arch sm_80(10/10)sm_80; CUDA 13.3ptxasaccepted itsm_75compilation rejected the operation with the requiredsm_80floorChecklist
Signed-off-bytrailercrates/cuda-bindings/changes