Use enable_tracing flag for ProxyTorchDispatchMode instead of modifying torch dispatch mode stack inner attributes#82643
Conversation
🔗 Helpful links
✅ No Failures (4 Pending)As of commit 9d7de52 (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
ezyang
left a comment
There was a problem hiding this comment.
Thank you. You'll also need the mode object stored on tensors PR because otherwise non-context manager use of ProxyTensor will still end up tracing even if you disable.
|
@pytorchbot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
Merge failed due to Refusing to merge as mandatory check(s) pull failed for rule superuser |
|
@pytorchbot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
Merge failed due to Refusing to merge as mandatory check(s) pull failed for rule superuser |
|
@pytorchbot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
Hey @IvanYashchuk. |
…ng torch dispatch mode stack inner attributes (#82643) (#82643) Summary: ### Description This PR removes fiddling with the mode stack using copies and ExitStack in favor of a simpler and more straightforward approach. ### Issue #81764 (comment) ### Testing No new tests are needed. Pull Request resolved: #82643 Approved by: https://github.com/ezyang Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/8092cf60c6d5985f88ab2c4ceceac75b83c428ff Reviewed By: kit1980 Differential Revision: D38395117 fbshipit-source-id: 0d0dcc9fb7c663181b82fed6bcb048bbd0ffc88c
Description
This PR removes fiddling with the mode stack using copies and ExitStack in favor of a simpler and more straightforward approach.
Issue
#81764 (comment)
Testing
No new tests are needed.