Conversation
This comment was marked as outdated.
This comment was marked as outdated.
cef8c1e to
247fdf5
Compare
b390a61 to
821c384
Compare
zhanyong-wan
requested changes
Jul 1, 2025
Collaborator
zhanyong-wan
left a comment
There was a problem hiding this comment.
Very nice!
Can you add a python test to ensure that OOM does result in a python exception with the expected error message as opposed to crashing?
This comment was marked as outdated.
This comment was marked as outdated.
821c384 to
08c5ecd
Compare
This was referenced Jul 3, 2025
048459c to
a370c5d
Compare
zhanyong-wan
approved these changes
Jul 21, 2025
46401cf to
0cc5400
Compare
34abde6 to
103cd0f
Compare
Collaborator
Author
|
I have opened issue #9502 addressing TPU hanging on OOM (was causing one of the TPU CIs to fail), which I believe should be addressed separately. |
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.
This PR makes 2 main changes in order to standardize and improve error handling:
ComputationClient::TransferFromDevicereturns aStatusOr<T>instancexla::PjRtLoadedExecutable::Execute(Sharded)withGetValueOrThrowThese changes mainly affect the errors whenever an OOM occurs. The second one targets eager mode. As an example, the following is the result of running the file below (without eager mode):
Before this PR:
After this PR:
(with
XLA_SHOW_CPP_ERROR_CONTEXT=1)