[Dynamo] Clear/restore torch function mode stack to prevent overriding torch.compile infrastructure#134733
Closed
mlazos wants to merge 26 commits intogh/mlazos/79/basefrom
Closed
[Dynamo] Clear/restore torch function mode stack to prevent overriding torch.compile infrastructure#134733mlazos wants to merge 26 commits intogh/mlazos/79/basefrom
mlazos wants to merge 26 commits intogh/mlazos/79/basefrom
Conversation
…g torch.compile infrastructure [ghstack-poisoned]
This was referenced Aug 28, 2024
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/134733
Note: Links to docs will display an error until the docs builds have been completed. ❌ 35 New FailuresAs of commit 5c9b0df with merge base 042f2f7 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…t overriding torch.compile infrastructure" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
…t overriding torch.compile infrastructure" After discussing offline with bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
mlazos
added a commit
that referenced
this pull request
Sep 8, 2024
Contributor
Author
|
Merged into #135422 |
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.
After discussing offline with @bdhirsh, we reached the conclusion that while tracing torch function modes it does not make sense to respect user overrides on functions we are running (ie the torch profiler for example) during the execution of torch.compile code, since we are symbolically respecting those modes during tracing. So, we pop all modes before tracing begins and restore them after tracing ends. Note the symbolic torch function mode stack contains all of the modes before they are popped.
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @rec