Skip to content

Conversation

@Zjq9409
Copy link
Contributor

@Zjq9409 Zjq9409 commented Nov 30, 2021

PR types

Performance optimization

PR changes

OPs

Describe

使用reduce实现broadcast sub 反向,相比于原始性能数据如下:

Case pytorch paddle(优化前) 优化前相比pytorch paddle(优化后) 优化后相比pytorch 加速比
[50, 128, 1000], [128, 1000] 0.30086 0.18073 优于 (39.93%) 0.17129 优于(43.07%) 1.06
[50, 128, 1000], [1, 128, 1000] 0.30359 0.17959 优于 (40.84%) 0.17206 优于(43.32%) 1.04
[16, 2048, 7, 7], [16, 2048] 0.09000 0.07593 优于 (15.63%) 0.06041 优于(32.88%) 1.26
[16, 2048, 16, 16], [16, 2048, 16, 16] 0.38284 0.25730 优于 (32.79%) 0.25788 优于(32.64%) 1.00
[6, 1, 80, 46080], [1] 0.20880 1.85418 差于 (7.88x) 0.11859 优于(43.2%) 15.64
[512, 896, 4, 12], [512, 896, 4, 1] 1.11503 2.82007 差于 (1.53x) 0.64902 优于(41.79%) 4.35
[512, 896, 4, 12], [512, 896, 4, 1] fp16 0.71971 2.73426 差于 (2.80x) 0.43191 优于(39.99%) 6.33
[32, 12, 128, 128], [32, 1, 1, 128] fp16 0.18400 0.45639 差于 (1.48x) 0.09958 优于(45.88%) 4.58
[32, 1, 1, 128], [1, 12, 128, 1] fp16 0.19077 0.31292 差于 (64.03%) 0.10816 优于(43.3%) 2.89
@paddle-bot-old
Copy link

paddle-bot-old bot commented Nov 30, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@paddle-bot-old
Copy link

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

@Zjq9409 Zjq9409 changed the title Boardcast sub bw implementation of broadcast sub backward by reduce Dec 1, 2021
@Zjq9409 Zjq9409 closed this Dec 1, 2021
@Zjq9409 Zjq9409 deleted the boardcast_sub_bw branch December 1, 2021 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant