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

refactor amp #2814

Merged
merged 4 commits into from
May 25, 2023
Merged

refactor amp #2814

merged 4 commits into from
May 25, 2023

Conversation

TingquanGao
Copy link
Collaborator

@TingquanGao TingquanGao commented May 23, 2023

  1. refactor engine: place the code related to AMP in a function _init_amp();
  2. refactor amp: class AutoCast automatically process amp cast, scaler automatically process loss scaling;
  3. fix: paddle.amp.GradScaler.minimize() dont support parameter_list of type dict;
  4. disable promote kernel for amp training(ref: disable promote kernel for amp training #2798).

@paddle-bot
Copy link

paddle-bot bot commented May 23, 2023

Thanks for your contribution!

there are diffs that step()+update() and minimize().
this will be fixed in PaddlePaddle/Paddle#53773.
compatible with paddle 2.5 and older version.
ref: PaddlePaddle#2798
@TingquanGao TingquanGao merged commit b087728 into PaddlePaddle:develop May 25, 2023
@TingquanGao TingquanGao deleted the dev/refactor_amp branch May 25, 2023 03:58
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