Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/160888
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit b397514 with merge base 4fd761f ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Now running AC does side effects! |
|
Could we give an exception to this side effect on the basis that it is not "externally visible"? (Since we promise to undo it before leaving the scope of the HOP.) |
| # utils.checkpoint innards. | ||
| @torch._disable_dynamo | ||
|
|
||
| _is_checkpoint_enabled = False |
There was a problem hiding this comment.
You want this to be thread-local, right?
There was a problem hiding this comment.
This is the only part I'm iffy about. Everything else looks good to me. Thoughts @albanD?
There was a problem hiding this comment.
Yeah... and probably needs to be part of the cpp thread_local_state (rather than threading.local in Python) if we care about the case where we do autograd inside an AC region
There was a problem hiding this comment.
From discussion with @albanD offline, adding to cpp thread_local_state sounds good, although it would mean that consistency between eager and compile can be tricky. Not sure how to go about this yet.
ghstack-source-id: 418d4ae Pull-Request-resolved: pytorch/pytorch#160888
|
btw I feel like a nonzero number of people have asked for this recently :P like @yanboliang |
Stack from ghstack (oldest at bottom):
Also test with SAC?
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @Lucaskabela