Skip to content

[inductor] modify the heuristic for disabling vectorization#136422

Closed
jiayisunx wants to merge 7 commits intogh/jiayisunx/31/basefrom
gh/jiayisunx/31/head
Closed

[inductor] modify the heuristic for disabling vectorization#136422
jiayisunx wants to merge 7 commits intogh/jiayisunx/31/basefrom
gh/jiayisunx/31/head

Conversation

@jiayisunx
Copy link
Copy Markdown
Collaborator

@jiayisunx jiayisunx commented Sep 23, 2024

Stack from ghstack (oldest at bottom):

Summary
Since we have already implemented tail loop mask vectorization (#126526), I re-tuned the heuristics for disabling vectorization from performance perspective. I changed the heuristic to: when the total number of elements along the vec dim is less than tiling_factor/4 and the number of operations is less than 10, we disable the vectorization.

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

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Sep 23, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit a6ee95b with merge base d2ec289 (image):
💚 Looks good so far! There are no failures yet. 💚

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

jiayisunx added a commit that referenced this pull request Sep 23, 2024
@jiayisunx jiayisunx marked this pull request as draft September 23, 2024 09:46
@jiayisunx jiayisunx added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Sep 23, 2024
[ghstack-poisoned]
[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Oct 8, 2024
@jiayisunx jiayisunx marked this pull request as ready for review October 8, 2024 08:58
]
)
and group[tiling_indices[0]] < tiling_factor / 2
and group[tiling_indices[0]] < tiling_factor / 4
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add code comment on this heuristics explaining why we set things like that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added, thanks for your comments!

[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Oct 9, 2024
jiayisunx added a commit to jiayisunx/pytorch that referenced this pull request Oct 21, 2024
jiayisunx added a commit that referenced this pull request Oct 21, 2024
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@jiayisunx jiayisunx requested a review from jansel November 4, 2024 02:39
@jiayisunx
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@github-actions github-actions Bot deleted the gh/jiayisunx/31/head branch December 5, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants