[dynamo] Record the pre-graph bytecode using fast record function event#154769
[dynamo] Record the pre-graph bytecode using fast record function event#154769anijain2305 wants to merge 16 commits intogh/anijain2305/773/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/154769
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit d96ec3a with merge base 13044b2 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
| if config.record_pre_graph_bytecode_in_traces: | ||
| # Record the pregraph bytecode start | ||
| self.add_push_null( | ||
| lambda: self.load_import_from( | ||
| utils.__name__, "record_pregraph_bytecode_enter" | ||
| ) | ||
| ) | ||
| self.extend_output(create_call_function(0, False)) | ||
| cm_var = self.new_var() | ||
| self.store(cm_var) |
There was a problem hiding this comment.
To check my understanding: if the profiler is off, we still call the record_pregraph_bytecode_enter and record_pregraph_bytecode_exit functions but those set up a contextlib.noop, right?
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot revert -c ghfirst -m "This fails internal tests see fburl.com/diff/67gyp7gp" |
|
@pytorchbot successfully started a revert job. Check the current status here. |
… overhead (#154764)" This reverts commit 7dee899. Reverted #154764 on behalf of https://github.com/seemethere due to This fails internal tests see [fburl.com/diff/67gyp7gp](https://fburl.com/diff/67gyp7gp) ([comment](#154769 (comment)))
…tion event (#154769)" This reverts commit 409c396. Reverted #154769 on behalf of https://github.com/seemethere due to This fails internal tests see [fburl.com/diff/67gyp7gp](https://fburl.com/diff/67gyp7gp) ([comment](#154769 (comment)))
|
@anijain2305 your PR has been successfully reverted. |
…unction event"  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…nt (pytorch#154769)  Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive. Pull Request resolved: pytorch#154769 Approved by: https://github.com/zou3519, https://github.com/williamwen42, https://github.com/StrongerXi, https://github.com/jansel
pytorch#154764) We observed that guard overhead at runtime using profiler traces was higher than reported in this profiling function at the compile time. After investigation, we found that f_locals are already in cache and that was causing the guard overhead to be way smaller while profiling during the compilation. To be more realistic, we flush the cache here. Profiling the guard overhead during compilation (in addition to at runtime) allows faster iteration time, and logging in tlparse and internal databases. Pull Request resolved: pytorch#154764 Approved by: https://github.com/zou3519, https://github.com/jansel, https://github.com/StrongerXi ghstack dependencies: pytorch#154769
… overhead (pytorch#154764)" This reverts commit 7dee899. Reverted pytorch#154764 on behalf of https://github.com/seemethere due to This fails internal tests see [fburl.com/diff/67gyp7gp](https://fburl.com/diff/67gyp7gp) ([comment](pytorch#154769 (comment)))
…tion event (pytorch#154769)" This reverts commit 409c396. Reverted pytorch#154769 on behalf of https://github.com/seemethere due to This fails internal tests see [fburl.com/diff/67gyp7gp](https://fburl.com/diff/67gyp7gp) ([comment](pytorch#154769 (comment)))
Summary: reland of pytorch/pytorch#154769 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov X-link: pytorch/pytorch#154974 Reviewed By: Lucaskabela Differential Revision: D75849934 Pulled By: anijain2305 fbshipit-source-id: 2d3cf61730774edf191d50d6205226a2221d3ea7
…tion event (#154974) reland of #154769 Pull Request resolved: #154974 Approved by: https://github.com/Lucaskabela, https://github.com/jansel
…tion event (pytorch#154974) reland of pytorch#154769 Pull Request resolved: pytorch#154974 Approved by: https://github.com/Lucaskabela, https://github.com/jansel
…tion event (#154974) reland of #154769 @diff-train-skip-merge Pull Request resolved: #154974 Approved by: https://github.com/Lucaskabela, https://github.com/jansel
Stack from ghstack (oldest at bottom):
Adds another event in the profiler traces. This can help us find models where pre-graph bytecode is very expensive.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov