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

Fix the underflow of fp16 fake quantize operators #43088

Merged
merged 1 commit into from
May 31, 2022

Conversation

leo0519
Copy link
Collaborator

@leo0519 leo0519 commented May 30, 2022

PR types

Bug fixes

PR changes

OPs

Describe

The float16 fake quantize operators may lead to underflow when dividing the scale.

  1. Move the computation of fake quantize ops from float16 to float32 (dtype is still float16)
  2. Simplify the code of fake quantize op unit test

@paddle-bot-old paddle-bot-old bot added contributor External developers status: proposed labels May 30, 2022
@paddle-bot-old
Copy link

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

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

LGTM

@qingqing01 qingqing01 merged commit 0ae8a2d into PaddlePaddle:develop May 31, 2022
fuyou765 pushed a commit to fuyou765/Paddle that referenced this pull request Jun 7, 2022
yghstill added a commit to yghstill/Paddle that referenced this pull request Jun 20, 2022
XiaoguangHu01 pushed a commit that referenced this pull request Jun 21, 2022
@paddle-bot-old paddle-bot-old bot removed the contributor External developers label Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants