Skip to content

[Inductor] simplify indexing_exprs in LoopBody._init_with_copy (#135574)#135935

Merged
atalman merged 1 commit intopytorch:release/2.5from
jiayisunx:jiayi/2.5
Sep 20, 2024
Merged

[Inductor] simplify indexing_exprs in LoopBody._init_with_copy (#135574)#135935
atalman merged 1 commit intopytorch:release/2.5from
jiayisunx:jiayi/2.5

Conversation

@jiayisunx
Copy link
Collaborator

@jiayisunx jiayisunx commented Sep 13, 2024

This PR fixes the performance regression of GroupNorm in Inductor on CPU. This PR uses var_ranges information to simplify indexing_exprs in LoopBody._init_with_copy 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

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang

…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
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 13, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135935

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 7286211 with merge base b7eb725 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Collaborator

@jgong5 jgong5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify in the PR title/description that this is a fix for a regression issue.

@jiayisunx jiayisunx added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Sep 13, 2024
@jiayisunx
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

PR targets release/2.5 rather than main, refusing merge request

Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@atalman atalman merged commit a889c85 into pytorch:release/2.5 Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants