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

Optimize performance of softmax_fwd when axis!=-1 #38602

Merged
merged 7 commits into from
Feb 9, 2022

Conversation

ZzSean
Copy link
Contributor

@ZzSean ZzSean commented Dec 30, 2021

PR types

Performance optimization

PR changes

OPs

Describe

Optimize performance of softmax_fwd when axis!=-1

case pytorch paddle 优化前 diff paddle 优化后 diff 加速比
fp32,[128,128,16,16] axis:0 0.23059 0.18179 优于 (26.84%) 0.07534 优于 (2.06x) 2.41
fp16,[128,128,16,16] axis:0 0.20328 0.14136 优于 (43.80%) 0.06305 优于 (2.22x) 2.24
fp32,[512,896,4,12] axis:1 0.76943 1.22761 差于 (59.55%) 0.56893 优于 (35.24%) 2.16
fp16,[512,896,4,12] axis:1 0.62722 1.02623 差于 (63.62%) 0.41894 优于 (49.72%) 2.45

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Liu-xiandong
Liu-xiandong previously approved these changes Jan 6, 2022
Copy link
Member

@Liu-xiandong Liu-xiandong left a comment

Choose a reason for hiding this comment

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

LGTM

@paddle-bot-old
Copy link

Sorry to inform you that e0b6286's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jan 14, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Jan 14, 2022
@paddle-bot-old
Copy link

Sorry to inform you that 418445b's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@AnnaTrainingG AnnaTrainingG left a comment

Choose a reason for hiding this comment

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

LGTM

@ZzSean ZzSean merged commit 8e1b020 into PaddlePaddle:develop Feb 9, 2022
@ZzSean ZzSean deleted the opt_softmax_fwd branch November 7, 2022 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants