Skip to content
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

[Inductor] decompose expm1 for CPP vec #92289

Closed
wants to merge 1 commit into from
Closed

Conversation

Valentine233
Copy link
Collaborator

@Valentine233 Valentine233 commented Jan 17, 2023

For micro-bench op aten.elu.default in TIMM, the performance is not good even though with vectorization. Elu uses expm1 as a sub-op. It turns out that inductor invokes sleef expm1 function while aten decomposes it with exp - 1. The former one performs worse than the latter one. This PR decomposes expm1 for cpp vectorization to make performance come back.

Performance data for eager v.s. inductor:

suite improved_ratio_speedup speedup_old RSD(3) speedup_new RSD(3)
timm 114.38% 0.803447768 8.39% 1.722458 27.74%

cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 17, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 2f10c4b:
💚 Looks good so far! There are no failures yet. 💚

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

@Valentine233 Valentine233 added the release notes: intel release notes category label Jan 17, 2023
@Valentine233 Valentine233 requested review from jgong5 and EikanWang and removed request for jgong5 January 18, 2023 00:57
@Valentine233 Valentine233 added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 18, 2023
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.

Add a comment to note the reason why we want to decompose it?

@Valentine233
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants