Skip to content

Conversation

@reyoung
Copy link
Collaborator

@reyoung reyoung commented Dec 25, 2017

Fix #6985
CPU time from 14.81s --> 12.23s, save 17%.
GPU time from 0.16s --> 0.09s, save 43%

@reyoung reyoung requested a review from qingqing01 December 25, 2017 07:44
@reyoung reyoung changed the title [WIP]Use tranform to rewrite adam Use tranform to rewrite adam Dec 25, 2017
@reyoung reyoung changed the title Use tranform to rewrite adam Use for_range to rewrite adam Dec 25, 2017
@reyoung reyoung requested a review from chengduoZH December 25, 2017 08:08
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.

I think it can be merge first, and these small questions will be modified later.

AdamFunctor(T beta1, T beta2, T epsilon, const T* beta1_pow,
const T* beta2_pow, const T* mom1, T* mom1_out, const T* mom2,
T* mom2_out, const T* lr, const T* grad, const T* param,
T* param_out)
Copy link
Contributor

Choose a reason for hiding this comment

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

The output variable should be the end of the function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. That will fit google C++ style.

@reyoung reyoung merged commit ea4bdca into PaddlePaddle:develop Dec 25, 2017
@reyoung reyoung deleted the feature/optimize_adam_speed branch December 26, 2017 09:20
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.

2 participants