[xla:gpu] Refactor ThunkEmitter and collective (group) lowering#46188
Open
ezhulenev wants to merge 1 commit into
Open
[xla:gpu] Refactor ThunkEmitter and collective (group) lowering#46188ezhulenev wants to merge 1 commit into
ezhulenev wants to merge 1 commit into
Conversation
ezhulenev
force-pushed
the
collectives-thunk-emitter-cleanup
branch
from
July 24, 2026 19:09
9a99b3c to
d0c4da6
Compare
ezhulenev
force-pushed
the
collectives-thunk-emitter-cleanup
branch
from
July 24, 2026 19:39
d0c4da6 to
6626085
Compare
ezhulenev
force-pushed
the
collectives-thunk-emitter-cleanup
branch
from
July 24, 2026 19:44
6626085 to
c558c02
Compare
ezhulenev
force-pushed
the
collectives-thunk-emitter-cleanup
branch
from
July 24, 2026 21:01
c558c02 to
59728c1
Compare
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.
NFC: this change doesn't haver any functional changes, and mostly tries to improve the structure and documentation on
ThunkEmitter.At run time XLA:GPU has one generic
Async(Start/Done)Thunkthat wraps nested synchronous compute.ThunkEmitterhad async wrapping logic scattered around many places. This change makes thunk emission consistent with the runtime mental model and documents and cleans upThunkEmitter.AsyncExecutionregistration and sharing between start/done thunks._collectives_grouplowering for grouped collectives and device send/recv operations.Motivation
The previous emitter mixed HLO dispatch, async lifecycle management, buffer selection, and thunk construction across several specialized paths. This made the semantics of generic async operations, legacy collectives, send/recv, host transfers, and grouped collectives difficult to reason about consistently.
The refactor makes those decisions explicit and ensures that: