Skip to content

Support for saving exceptions in async CPU ops#12904

Closed
ilia-cher wants to merge 1 commit intopytorch:masterfrom
ilia-cher:export-D10479130
Closed

Support for saving exceptions in async CPU ops#12904
ilia-cher wants to merge 1 commit intopytorch:masterfrom
ilia-cher:export-D10479130

Conversation

@ilia-cher
Copy link
Copy Markdown
Contributor

@ilia-cher ilia-cher commented Oct 21, 2018

Summary:
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("error msg") in async part -> net->Run() rethrows the same
    exception

Differential Revision: D10479130

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
@ezyang ezyang added the merged label Jun 25, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants