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 the realization of cuda dropout #19136

Merged
merged 6 commits into from
Aug 20, 2019
Merged

optimize the realization of cuda dropout #19136

merged 6 commits into from
Aug 20, 2019

Conversation

wangchaochaohu
Copy link
Contributor

@wangchaochaohu wangchaochaohu commented Aug 12, 2019

dropout use thrust api to generate the random is too slow, use the curand can speed up
PaddlePaddle/benchmark#148

测试transformer-big(enable_ce)中dropout OP 的平均耗时:(利用PaddlePaddle的profiler工具):
Ave Time : 1.16155 ----> 0.344537

transformer-big模型加速效果,性能提升约:10%

  • 实验环境:V100 + CUDA10.0
  • 单GPU训练速度: 1.852 step/s-> 2.047 step /s
    transformer-base模型加速效果,性能提升约:12%
  • 实验环境:V100 + CUDA10.0
  • 单GPU训练速度: 5.503step/s-> 6.240 step /s
    CUDA实现修改之后无多卡随机性问题

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

.dropout_op.cu.swm 是误传?

@wangchaochaohu
Copy link
Contributor Author

.dropout_op.cu.swm 是误传?

误传 已经删了

Copy link
Contributor

@chengduoZH chengduoZH left a comment

Choose a reason for hiding this comment

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

LGTM

@wangchaochaohu wangchaochaohu merged commit 6e326ca into PaddlePaddle:develop Aug 20, 2019
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.

None yet

3 participants