Skip to content

Fuse Adam And SGD ops#15933

Merged
chengduoZH merged 29 commits intoPaddlePaddle:developfrom
chengduoZH:fuse_optimizer_ops
Mar 28, 2019
Merged

Fuse Adam And SGD ops#15933
chengduoZH merged 29 commits intoPaddlePaddle:developfrom
chengduoZH:fuse_optimizer_ops

Conversation

@chengduoZH
Copy link
Contributor

@chengduoZH chengduoZH commented Feb 26, 2019

Code separated from #15497

Transformer:

执行引擎 GPU卡 FuseAdam 速度 加速比
threaded_executor 1 4.162 1
threaded_executor 1 4.27 0.026

test=develop
@chengduoZH chengduoZH force-pushed the fuse_optimizer_ops branch 2 times, most recently from 6919fac to f4efaca Compare February 26, 2019 09:40
test=develop
@chengduoZH chengduoZH force-pushed the fuse_optimizer_ops branch 2 times, most recently from 8dd7300 to c7f55b6 Compare February 27, 2019 02:24
test=develop

bool fuse_elewise_add_act_ops_{false};

bool fuse_all_optimizer_ops_{false};
Copy link
Contributor

Choose a reason for hiding this comment

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

enable by default?

Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this pass can improve performance on all models, today I'll turn it on and run on CE.

Copy link
Contributor

Choose a reason for hiding this comment

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

what's the result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some models, the speed can be increased by 19%, for example, the model_object_detection model (in the case of 4 cards), in some models, the speed decreases slightly by 1%.

test=develop
@chengduoZH chengduoZH force-pushed the fuse_optimizer_ops branch from ff90563 to cba8090 Compare March 1, 2019 13:03
chengduozh added 3 commits March 3, 2019 19:52
test=develop
test=develop
chengduozh added 2 commits March 10, 2019 16:43
test=develop
test=develop
test=develop
chengduozh added 2 commits March 11, 2019 16:19
test=develop
test=develop
panyx0718
panyx0718 previously approved these changes Mar 28, 2019
panyx0718
panyx0718 previously approved these changes Mar 28, 2019
@chengduoZH chengduoZH merged commit 1096746 into PaddlePaddle:develop Mar 28, 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.

2 participants