PR #22437: Added frontend attribute handling to explicit_stream_annotation_async_wrapper #23021
+90
−103
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.
PR #22437: Added frontend attribute handling to explicit_stream_annotation_async_wrapper
Imported from GitHub PR #22437
This is a small change that ensures the frontend attributes are correctly passed to both the
async-start
andasync-done
created pairs. This also clears the scheduling attributes that are directly on the call operation and inner ops.The specific goal of this change is to have stable support combining the scheduling group ids with stream annotation in JAX.
Currently, the issue stems from the
set_xla_metadata
context manager, which will apply the frontend attribute to all operations, including the ones within ourjitted_func
. When the same scheduling annotations is found in twoHloComputation
s, an error is raised inLegalizeSchedulingAnnotations
. This is intended to avoid hitting this check, and cleaning up the annotations on the wrapped streamed computation.Copybara import of the project:
--
994c2ee by chaser [email protected]:
Added frontend attributed handling
--
9db58b2 by chaser [email protected]:
Added clearing of scheduling annotations
--
a83e32a by chaser [email protected]:
Added HloInstruction.erase_frontend_attribute
Merging this change closes #22437
Reverts 91ca1f1
FUTURE_COPYBARA_INTEGRATE_REVIEW=#22437 from chaserileyroberts:chase/frontend_forward_async_wrapper a83e32a