Repository navigation
Add mma.sync.aligned.m8n8k4 f64 double-precision tensor core intrinsic - #323
Merged
Merged
Conversation
honeyspoon
force-pushed
the
add-mma-f64
branch
2 times, most recently
from
July 1, 2026 15:55
2502499 to
0c5ad3b
Compare
Collaborator
|
Thanks for the PR. I layered a couple of things on top:
This partially addresses #274 by completing its FP64 Reviewer note: The only remaining technical check is a real-GPU numerical test across all 32 lane fragments against a CPU reference. |
Signed-off-by: nihalp <[email protected]>
Signed-off-by: nihalp <[email protected]>
- Replace no-op `impl Verify` with real validation (3 MirPtrType operands, 0 results) matching ldmatrix/stmatrix verifier patterns. - Fix missing imports: emit_goto, llvm_types, inline_asm_convergent. - Merge dialect_nvvm::ops import into single use statement. - Add #[allow(clippy::too_many_arguments)] on emit_mma_m8n8k4_f64. - Align safety docs with movmatrix style (divergent-flow UB, ISA floor). - Strengthen lowering test to assert constraints, AsmKind::Convergent, operand count, and result count. Signed-off-by: nihalp <[email protected]>
Signed-off-by: nihalp <[email protected]>
Signed-off-by: nihalp <[email protected]>
49 tasks done
nihalpasham
added a commit
that referenced
this pull request
Jul 3, 2026
* Add mma.sync.aligned.m16n8k16 f16 tensor core intrinsic Adds the FP16 variant of the Ampere mma.sync instruction, following the same register-only 4-layer pattern established by the BF16 (#321) and F64 (#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. * fix: harden f16 warp MMA contract Signed-off-by: nihalp <[email protected]> * style: format standalone MMA example Signed-off-by: nihalp <[email protected]> --------- Signed-off-by: nihalp <[email protected]> Co-authored-by: nihalp <[email protected]>
This was referenced Jul 3, 2026
Closed
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 Ampere FP64
mma.sync.aligned.m8n8k4tensor-core operation as anunsafe, register-valued cuda-device intrinsic.
The operation consumes the calling lane's two C registers plus one A and one B
register, and returns two D registers. It generates no hidden pointer traffic
or fixed PTX temporary-register declarations.
Partially addresses #274. Related to #289; this PR does not close either issue.
What changed
Device API and safety
mma_m8n8k4_f64([f64; 2], f64, f64) -> [f64; 2].sm_80+requirements.
Compiler pipeline
SSA results.
f64registerconstraints and no memory clobber.
Target selection and regressions
sm_80.call coverage.
with BF16 MMA and the packed atomics already on
main.Testing
cargo fmt --all -- --checkcargo check --workspace --all-targetssm_80ptxas -arch=sm_80accepts both kernelsDMMA.884instructions withSTACK:0 LOCAL:0sm_75is rejected before PTX generationsm_90, emits both MMAforms and both packed atomics, and assembles with zero stack or spills
sm_80+GPUChecklist
crates/cuda-bindings/files changed