-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[AMP] Support overload of paddle.static.amp.decorate function. #52918
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献! |
Xreki
changed the title
Implement a common AmpTestBase.
[AMP] Support overload of paddle.static.amp.decorate.
Apr 17, 2023
Xreki
changed the title
[AMP] Support overload of paddle.static.amp.decorate.
[AMP] Support overload of paddle.static.amp.decorate function.
Apr 17, 2023
zhangting2020
approved these changes
Apr 17, 2023
ZzSean
approved these changes
Apr 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for skipIf
jjyaoao
pushed a commit
to jjyaoao/Paddle
that referenced
this pull request
Apr 19, 2023
…ePaddle#52918) * Implement a common AmpTestBase. * Support overload of decorate. * Change the ignore list of flake and fix an error.
lijialin03
pushed a commit
to lijialin03/Paddle
that referenced
this pull request
Apr 25, 2023
…ePaddle#52918) * Implement a common AmpTestBase. * Support overload of decorate. * Change the ignore list of flake and fix an error.
zhangting2020
pushed a commit
to zhangting2020/Paddle
that referenced
this pull request
Apr 28, 2023
…ePaddle#52918) * Implement a common AmpTestBase. * Support overload of decorate. * Change the ignore list of flake and fix an error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Describe
老版本静态图AMP接口只支持FP16。为了兼容老版本,Paddle 2.5版本计划新增一个同名函数
paddle.static.amp.decorate
,通过dtype、level配置不同数据类型、不同级别AMP训练。(相关功能已经在#52694中实现,PR中暂时新增了一个amp_decorate
接口。)本PR参考文章为什么 Python 没有函数重载?如何用装饰器实现函数重载?,实现了专为
decorate
设计的overload功能,从而支持框架中同时存在2个paddle.static.amp.decorate
函数,且能自动通过参数选择正确的版本。flake会自动检查python是否定义了同名函数,故将该文件加入了ignore列表中。