Skip to content

Conversation

@pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #17158 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/402/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/402/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/402/orig
Differential Revision: D92171362
@diff-train-skip-merge

…ception-safe

Refactored Context::flush() by extracting two new public functions:
- wait_for_queue(): blocks until the GPU queue is idle
- clear_resources(): clears command/descriptor pools and cleanup lists

This allows callers to use these operations independently. ComputeGraph's
destructor now uses these functions directly and wraps them in try/catch
blocks to ensure it never throws exceptions, following C++ best practices
for destructors.

Authored with Claude.

Differential Revision: [D92171362](https://our.internmc.facebook.com/intern/diff/D92171362/)

ghstack-source-id: 337901647
Pull Request resolved: #17158
@pytorchbot pytorchbot requested a review from SS-JIA as a code owner February 4, 2026 01:02
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 4, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17191

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures

As of commit 652ae23 with merge base 593775b (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 4, 2026
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@SS-JIA SS-JIA merged commit 10d79a4 into main Feb 4, 2026
179 of 184 checks passed
@SS-JIA SS-JIA deleted the gh/SS-JIA/402/orig branch February 4, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants