Support for saving exceptions in async CPU ops#12904
Closed
ilia-cher wants to merge 1 commit intopytorch:masterfrom
Closed
Support for saving exceptions in async CPU ops#12904ilia-cher wants to merge 1 commit intopytorch:masterfrom
ilia-cher wants to merge 1 commit intopytorch:masterfrom
Conversation
5f959ad to
669af0e
Compare
669af0e to
f4ce7ac
Compare
f4ce7ac to
b5de155
Compare
b5de155 to
4bba351
Compare
4bba351 to
a20b1f6
Compare
a20b1f6 to
842247f
Compare
Summary: Pull Request resolved: pytorch#12904 Enabling support for saving exceptions in async parts of CPU ops via event().SaveException(). The error contract for CPU ops becomes: - return false in sync part -> net->Run() returns false - throw in sync part -> net->Run() rethrows the same exception - SetFinished("error msg") in async part -> net->Run() returns false - event().SetFinishedWithException() in async part -> net->Run() rethrows the same exception Reviewed By: andrewwdye Differential Revision: D10479130 fbshipit-source-id: 2040a471492a128dbb247ba537a3f6fd5cadffe0
842247f to
b99475e
Compare
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#12904 Enabling support for saving exceptions in async parts of CPU ops via event().SaveException(). The error contract for CPU ops becomes: - return false in sync part -> net->Run() returns false - throw in sync part -> net->Run() rethrows the same exception - SetFinished("error msg") in async part -> net->Run() returns false - event().SetFinishedWithException() in async part -> net->Run() rethrows the same exception Reviewed By: andrewwdye Differential Revision: D10479130 fbshipit-source-id: 850ee9cbf83b04dd24b25eba359439b0cf7853c0
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.
Summary:
Enabling support for saving exceptions in async parts of CPU ops via
event().SaveException(). The error contract for CPU ops becomes:
exception
Differential Revision: D10479130