Insert aten.add into fallback_ops, and fix Tensor -> Scalar conversion in ir.FallbackKernel#140624
Insert aten.add into fallback_ops, and fix Tensor -> Scalar conversion in ir.FallbackKernel#140624benjaminglass1 wants to merge 9 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/140624
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 209ee40 with merge base 93aef68 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| aten.add.Tensor: aten.add.Scalar, | ||
| aten.div.Tensor: aten.div.Scalar, | ||
| aten.divide.Tensor: aten.divide.Scalar, | ||
| aten.floor_divide: aten.floor_divide.Scalar, |
There was a problem hiding this comment.
Note for reviewers: this is intentional; floor_divide's Tensor operator has no suffix.
| "aten.adaptive_max_pool3d.default", | ||
| "aten.adaptive_max_pool3d_backward.default", | ||
| "aten.add.Scalar", | ||
| "aten.add.Tensor", |
There was a problem hiding this comment.
Do we have to add this as a fallback? aten.add.Tensor should be a simple pointwise op and properly codegen-ed by Inductor.
There was a problem hiding this comment.
@desertfire I agree, and I'm unsure why we ran into this, but the complex fallback test specifically required this op. I'd also note that we already codegen for mul.Scalar and mul.Tensor below...
There was a problem hiding this comment.
@desertfire It appears that the test in question (test_complex_fallback) is deliberately triggering a situation where inductor will choose to fallback to aten.add (adding complex numbers). We can continue to skip this test indefinitely if you'd prefer not to add new fallback ops, but passing the test will require this fallback.
I know that there's some work ongoing with better supporting complex numbers in torch, but I don't really know the status of that, so this may be needed for a while.
Pull Request resolved: #140634 Approved by: https://github.com/desertfire ghstack dependencies: #140624
Pull Request resolved: #140817 Approved by: https://github.com/desertfire ghstack dependencies: #140624, #140634
…n in ir.FallbackKernel (pytorch#140624) The code in ir.FallbackKernel will long-term be obviated by the solution for pytorch#90923. Closes pytorch#131334. Pull Request resolved: pytorch#140624 Approved by: https://github.com/desertfire
Pull Request resolved: pytorch#140634 Approved by: https://github.com/desertfire ghstack dependencies: pytorch#140624
Pull Request resolved: pytorch#140817 Approved by: https://github.com/desertfire ghstack dependencies: pytorch#140624, pytorch#140634
…n in ir.FallbackKernel (pytorch#140624) The code in ir.FallbackKernel will long-term be obviated by the solution for pytorch#90923. Closes pytorch#131334. Pull Request resolved: pytorch#140624 Approved by: https://github.com/desertfire
Pull Request resolved: pytorch#140634 Approved by: https://github.com/desertfire ghstack dependencies: pytorch#140624
Pull Request resolved: pytorch#140817 Approved by: https://github.com/desertfire ghstack dependencies: pytorch#140624, pytorch#140634
Stack from ghstack (oldest at bottom):
The code in ir.FallbackKernel will long-term be obviated by the solution for #90923.
Closes #131334.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov