[TIRx][CUDA] Support predicated gemm_async - #20072
Closed
jinhongyii wants to merge 1 commit into
Closed
Conversation
Forward an optional instruction predicate to every dense and block-scaled tcgen05 MMA emitted by gemm_async, and let TCGen05Bar use the same predicate for its commit. Add codegen coverage for block-scaled MMA and unicast/multicast commits, plus tile-level checks that all internal MMAs and the matching commit share one predicate.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
jinhongyii
marked this pull request as draft
July 29, 2026 05:22
Contributor
Author
|
Closing this in favor of the existing explicit single-lane guard form ( |
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.
Motivation and context
Blackwell
tcgen05.mmais issued by a single thread, while oneTx.gemm_asynctile call may expand into multiple dense or block-scaled MMA instructions over its M, N, and K iterations. Persistent kernels sometimes need to keep the surrounding state machine warp-uniform, so they compute a one-lane predicate and apply it at the instruction level:Before this PR, the
predconfiguration was not forwarded by thegemm_asynctcgen05 dispatcher to every MMA it generated. In addition, the block-scaled MMA path andTCGen05Bar.arrivedid not support forwarding the same predicate. Predicating only the matching commit is not sufficient: the active lanes may still issue all internal MMA instructions.Changes
predvalue from thegemm_asynctile-call configuration and forward it to every generated dense or block-scaled tcgen05 MMA.ptx_tcgen05_mma_block_scaleand its CUDA helper generation.uint32value to a PTX predicate and emitting@p_issue tcgen05.mma....predtoTCGen05Bar.arriveand forward it to both the single-CTA and multicasttcgen05.commitforms.The existing behavior remains unchanged when
predis omitted.Testing
TCGen05Barcommits in CUDA codegen.@p_issue tcgen05.mma....Focused result: 5 tests passed.