Fix usages of contextmanager without finally#96170
Fix usages of contextmanager without finally#96170Chillee wants to merge 5 commits intogh/chillee/193/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/96170
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit c3e05ca: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
torch/_inductor/codegen/common.py
Outdated
| yield | ||
| finally: | ||
| for _ in range(-offset): | ||
| self.writeline("{") |
There was a problem hiding this comment.
Some of these don't really make sense. If there's an exception why would we keep doing codegen?
There was a problem hiding this comment.
Hmm... in my rush I was thinking that you might throw an exception during codegen on purpose and then catch it. But that should already be covered by a try/except I think, and otherwise we shouldn't expect it to work.
There was a problem hiding this comment.
so you're going to undo this right
There was a problem hiding this comment.
Actually I'm not totally sure on which ones of these I should undo 🤔 What about like, the changes to set_current_node?
cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
| import colorama | ||
|
|
||
| info_str = f"{kernel_name}\t {ms:.3f}ms\t{num_gb:.3f} GB \t {gb_per_s:.2f}GB/s" | ||
| info_str = f"{ms:.3f}ms \t{num_gb:.3f} GB \t {gb_per_s:.2f}GB/s \t {kernel_name}" |
There was a problem hiding this comment.
Also sneaking in some random fixes to TORCHINDUCTOR_PROFILE. Will add a test for this stuff in next commit.
cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire