Repository navigation
feat(wgmma): support three-slot counted pipelines - #1021
Merged
nihalpasham merged 1 commit intoAug 19, 2026
Merged
Conversation
Signed-off-by: Raul Estrada <[email protected]>
uurl
force-pushed
the
feat/wgmma-three-slot-counted-k-loop
branch
from
August 18, 2026 11:33
7ddbb80 to
6c1e5f3
Compare
Collaborator
|
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 #1020
Summary
Extend the production BF16 WGMMA counted-loop pipeline from the existing two-slot
wait_group<1>form to also support a three-slotwait_group<2>form.The counted carrier, recognizer, and lowering now derive the accumulator-slot count from the partial-wait depth while deliberately restricting the production contract to:
The straight-line WGMMA pipeline continues to support its broader
wait_group<N>range independently.Implementation
The counted-loop carrier now models a variable number of accumulator slots and carries the corresponding partial-wait depth.
The production layout is derived from:
This gives:
The counted inline-PTX template now emits one
MMA -> commit_group -> wait_group<N>stage per slot, advances all descriptor recurrences inside the same counted loop, and performs a finalwait_group<0>before any accumulator result becomes visible to LLVM.Recognition
The counted-loop recognizer remains fail-closed.
It now requires:
MMA -> commit_group -> wait_group<N>stage per slotNequal to either 1 or 2wait_group<0>Malformed counted pipelines are rejected rather than partially fused.
Negative coverage includes:
wait_group<1>/wait_group<2>stageswait_group<2>with only two slotsValidation
Results:
ptxasresults onsm_90a:The three-slot production path therefore keeps all 96 tied accumulator values register-resident without introducing stack or spill traffic.
Scope
This PR modifies the counted WGMMA production path only.
It does not extend counted pipelines beyond
wait_group<2>and does not change the existing broader straight-line WGMMA pipeline support.