[Inductor] simplify indexing_exprs in LoopBody._init_with_copy#135574
[Inductor] simplify indexing_exprs in LoopBody._init_with_copy#135574jiayisunx wants to merge 2 commits intogh/jiayisunx/29/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135574
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 6506095 with merge base 9902b34 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| ) | ||
|
|
||
| @config.patch("cpp.enable_tiling_heuristics", False) | ||
| def test_group_norm_vec(self): |
There was a problem hiding this comment.
I think the UT also need to check the vectorization is as expected instead of scalarization as fallback
There was a problem hiding this comment.
we have checked the number of vec kernels here: https://github.com/pytorch/pytorch/pull/135574/files/650609529833142b18d72b7f35ae199228fb896c#diff-042e454a3b5e4ae5aea2ff41066b5646ab068ca92b7e0adb5f9a81c6d7cec422L3446
I removed the patch that disabled the tiling select heuristic, now the UT can correctly check the vectorization is as expected.
jgong5
left a comment
There was a problem hiding this comment.
Please improve UT per @leslie-fang-intel 's suggestion.
|
@jansel , could you please review this PR? Thanks! |
|
@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 |
This PR uses `var_ranges` information to simplify `indexing_exprs` in `LoopBody._init_with_copy` to to reduce occurrences of `FloorDiv` and `ModularIndexing` in the `indexing_exprs`. Pull Request resolved: #135574 Approved by: https://github.com/jgong5, https://github.com/leslie-fang-intel, https://github.com/jansel
ghstack-source-id: 9a2ad56 Pull Request resolved: pytorch/pytorch#135574
…) (#135935) This PR uses `var_ranges` information to simplify `indexing_exprs` in `LoopBody._init_with_copy` to to reduce occurrences of `FloorDiv` and `ModularIndexing` in the `indexing_exprs`. Pull Request resolved: #135574 Approved by: https://github.com/jgong5, https://github.com/leslie-fang-intel, https://github.com/jansel
…ch#135574) This PR uses `var_ranges` information to simplify `indexing_exprs` in `LoopBody._init_with_copy` to to reduce occurrences of `FloorDiv` and `ModularIndexing` in the `indexing_exprs`. Pull Request resolved: pytorch#135574 Approved by: https://github.com/jgong5, https://github.com/leslie-fang-intel, https://github.com/jansel
Stack from ghstack (oldest at bottom):
This PR uses
var_rangesinformation to simplifyindexing_exprsinLoopBody._init_with_copyto to reduce occurrences ofFloorDivandModularIndexingin theindexing_exprs.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang