Repository navigation
feat(wgmma): add value-threaded F16 full-drain lowering - #1025
Merged
nihalpasham merged 2 commits intoAug 19, 2026
Merged
Conversation
Signed-off-by: Raul Estrada <[email protected]>
uurl
force-pushed
the
feat/wgmma-f16-value-threaded-full-drain
branch
from
August 18, 2026 12:18
4a93e5f to
d2140ce
Compare
Collaborator
|
# Conflicts: # crates/mir-lower/src/convert/intrinsics/wgmma.rs
nihalpasham
approved these changes
Aug 19, 2026
nihalpasham
pushed a commit
that referenced
this pull request
Aug 20, 2026
…s own test (#1052) `mlir-dialects.md` anchors its op counts to a catalog stamp and says how to tell when they have rotted: At catalog SHA-256 `20440c06` (the stamp in every `ops/generated/` file header), the dialect holds 560 operations across 42 modules ... If the header stamp no longer starts with `20440c06`, the counts on this page predate the catalog you are reading. Every generated file now stamps `26a9cc13`, so that condition is true. Six numbers and one description are stale, all of them from the last batch of merges: | claim | page | tree | |---|--:|--:| | dialect total | 560 | **570** | | hand-written ops | 19 | **21** | | hand-written `wgmma` row | 7 | **9** | | generated ops | 541 | **549** | | catalog entries | 1002 | **1010** | | generated "Warp-level" row | 31 | **39** | The two deltas are traceable: #1021 and #1025 added two hand-written `wgmma` ops (19 -> 21), and #1032 added the eight `redux.sync` f32 variants (541 -> 549, 1002 -> 1010, and the Warp-level row that owns `redux`). The `wgmma` row's description moved with its count rather than just the number. It read "the m64n64k16 bf16 shapes", but #1025 added `WgmmaMmaM64N64K16F32F16Op` and `WgmmaMmaGroupValuesM64N64K16F32F16Op`, so the module now holds f16 shapes too. Module counts did not change: 7 hand-written plus 35 generated is still 42. Verified against the tree rather than against the merge descriptions: `^pub struct \w+Op;` counts 21 under `src/ops/` and 549 under `src/ops/generated/`, 570 together; `intrinsics/catalog.json` holds 1010 entries; and all 35 generated files carry the one stamp `26a9cc13`. Both tables sum to their new totals (7 rows to 21, 11 rows to 549) and each still lists every module on disk with nothing that is not one. Book builds clean under `sphinx-build -W`. Signed-off-by: Vyncint Ng <[email protected]>
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.
Closes #1024
Summary
Adds value-threaded lowering for Hopper
wgmma.mma_async.sync.aligned.m64n64k16.f32.f16.f16in the canonical linear full-drain case.
F16 now follows the existing BF16 register-resident strategy for:
The 32
f32accumulator values remain tied through one convergent inline-PTX region, preventing LLVM from introducing a spill boundary while the asynchronous WGMMA group is in flight.What changed
Device API / importer
wgmma_mma_m64n64k16_f32_f16.NVVM dialect
Adds:
WgmmaMmaM64N64K16F32F16OpWgmmaMmaGroupValuesM64N64K16F32F16OpThe F16 value carrier has the same 32 ×
f32accumulator interface as the existing BF16 carrier.No F16 counted-loop or pipeline carrier ops are added.
MIR lowering
Generalizes the linear value-group PTX template over BF16/F16 input kind.
Emits:
for F16.
Recognizes canonical pointer-form F16 linear full-drain regions.
Converts them to the value-threaded carrier.
Requires homogeneous BF16 or F16 MMAs within a single linear full-drain region.
Rejects non-canonical F16 accumulators instead of using the BF16 deferred
pointer fallback.
Existing counted-loop and partial-wait recognizers remain BF16-only.
Tests
Adds coverage for:
The existing
wgmma_value_carrier_ptxend-to-end test is also extended to F16.Validation
Validated locally with CUDA 13.2 /
ptxastargetingsm_90a.WGMMA lowering tests:
Book build with warnings treated as errors:
End-to-end WGMMA value-carrier PTX tests:
For all four PTXAS probes:
The F16 mnemonic is accepted directly by CUDA 13.2
ptxasforsm_90a.Scope
This PR deliberately does not add:
Those remain fail-closed and can be addressed independently.