-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Inductor respects exact strides on custom ops by default #150511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150511
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 052aae3 with merge base e9e1aac ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀
Can you add a check ops with this tag here:
pytorch/torch/_inductor/graph.py
Lines 239 to 251 in 8102272
| for cur in reversed(g.nodes): | |
| if isinstance( | |
| cur.target, | |
| torch._higher_order_ops.triton_kernel_wrap.TritonKernelWrapperMutation, | |
| ): | |
| cur.meta["dislike_padding"] = True | |
| continue | |
| op = _get_overload_packet(cur) | |
| if not op: | |
| continue | |
| if op in ops_dislike_padding: | |
| cur.meta["dislike_padding"] = True |
|
@eellison to make sure I understand, we are saying that if an operator has needs_exact_strides, then we should set dislike_padding on it too? |
|
Yes, thats correct |
|
Cool, going to put that into the PR below this one (I want this PR to be mostly just the config switch so that it's easy to revert) |
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI [ghstack-poisoned]
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 |
…0511)" This reverts commit a4bb2f1. Reverted #150511 on behalf of https://github.com/atalman due to [GH job link](https://github.com/pytorch/pytorch/actions/runs/14357056427/job/40251630946) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/2e7c9d33e7f933ac3b723cb3bb05b9c88432c25c) ([comment](#148104 (comment)))
|
@zou3519 your PR has been successfully reverted. |
) If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: pytorch#150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: pytorch#150495, pytorch#148104
…orch#150511)" This reverts commit a4bb2f1. Reverted pytorch#150511 on behalf of https://github.com/atalman due to [GH job link](https://github.com/pytorch/pytorch/actions/runs/14357056427/job/40251630946) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/2e7c9d33e7f933ac3b723cb3bb05b9c88432c25c) ([comment](pytorch#148104 (comment)))
) If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: pytorch#150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: pytorch#150495, pytorch#148104
…orch#150511)" This reverts commit a4bb2f1. Reverted pytorch#150511 on behalf of https://github.com/atalman due to [GH job link](https://github.com/pytorch/pytorch/actions/runs/14357056427/job/40251630946) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/2e7c9d33e7f933ac3b723cb3bb05b9c88432c25c) ([comment](pytorch#148104 (comment)))
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: #150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: #150495, #148104 ghstack-source-id: 7192ed4
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: #150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: #150495, #148104 ghstack-source-id: 4ef6024
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: #150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: #150495, #148104 ghstack-source-id: 923efe0
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
If a tag is not specified on a custom operator, then inductor will assume that it needs exact strides. Test Plan: - tests + CI Pull Request resolved: #150511 Approved by: https://github.com/eellison, https://github.com/shunting314 ghstack dependencies: #150495, #148104 ghstack-source-id: f095c0a
|
@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):
If a tag is not specified on a custom operator, then inductor will
assume that it needs exact strides.
Test Plan:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov