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 perf of reduce_any #33761

Merged
merged 5 commits into from
Jul 12, 2021
Merged

optimize perf of reduce_any #33761

merged 5 commits into from
Jul 12, 2021

Conversation

ZzSean
Copy link
Contributor

@ZzSean ZzSean commented Jun 24, 2021

PR types

Performance optimization

PR changes

OPs

Describe

优化任意维度 reduce 的性能

case axis Pytorch 优化前 优化后 加速比(old/new) diff with pytorch
[32, 12, 128, 128] [0, 3] 0.04004 0.05693 0.03473 1.64 优于 (13.26%)
[16, 32, 32, 32] [1, 3] 0.00792 0.00882 0.00443 1.99 优于 (44.07%)
[16, 64, 512, 64] [1, 3] 0.16585 0.28347 0.15995 1.77 打平 (3.56%)
[16, 2048, 32, 32] [1, 3] 0.16437 0.28301 0.17622 1.61 差于 (7.21%)
[16, 32, 2048, 32] [1, 3] 0.16290 0.36183 0.16178 2.24 打平 (0.69%)
[16, 2048, 32, 32] [0, 2] 0.16285 0.8464 0.16668 5.08 打平 (2.35%)
[16, 32, 2048, 32] [0, 2] 0.16657 1.92995 0.16499 11.70 打平 (0.95%)
[16, 2048, 33, 33] [0, 2] 0.17842 0.90048 0.18290 4.92 打平 (2.51%)
[16, 33, 2048, 33] [0, 2] 0.26361 2.05965 0.23080 8.92 优于 (12.45%)

@paddle-bot-old
Copy link

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

@ZzSean ZzSean force-pushed the reduce_any branch 2 times, most recently from 521c38b to b7a065a Compare July 2, 2021 09:04
Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

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

LGTM and great work~

@Xreki Xreki merged commit 2dde0eb into PaddlePaddle:develop Jul 12, 2021
@ZzSean ZzSean deleted the reduce_any branch July 14, 2021 02:18
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.

3 participants