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

[Bug fix] Do not quantize weights Y when matmul X and Y both other ops outputs #43297

Merged

Conversation

lidanqing-intel
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

Fix bug for ernie3.0 enable_mkldnn_int8, that do not quantize weights Y when matmul X and Y both other ops outputs

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

paddle-bot-old bot commented Jun 7, 2022

你的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.

@lidanqing-intel
Copy link
Contributor Author

This change is aligned with python save_quant_model.py (save_quant_model.py could quantize Ernie3.0 but enable_mkldnn_int8 failed and this PR fixed it). Now Ernie3.0 enable_mkldnn_int8 could work successfully.
image

@lidanqing-intel lidanqing-intel changed the title [Bug fix] Do not quantize weights when matmul X and Y both other ops outputs [Bug fix] Do not quantize weights Y when matmul X and Y both other ops outputs Jun 7, 2022
@lidanqing-intel
Copy link
Contributor Author

lidanqing-intel commented Jun 7, 2022

@sfraczek @wozna Please review this PR, Thanks.

Copy link
Contributor

@sfraczek sfraczek left a comment

Choose a reason for hiding this comment

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

LGTM

@lidanqing-intel
Copy link
Contributor Author

@jczaja Hi could you please review this PR, we agreed to have at least two people to review the PR.

Copy link
Contributor

@jczaja jczaja left a comment

Choose a reason for hiding this comment

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

LGTM

@lidanqing-intel lidanqing-intel merged commit 06d999f into PaddlePaddle:develop Jun 9, 2022
@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 9, 2022

你的PR已合入Paddle库,请关注后续测试结果。
Your PR has been merged into the repository. An official integration test will be conducted later. Stay tuned.

@lidanqing-intel lidanqing-intel deleted the develop-fix-ernie3.0 branch June 9, 2022 17:12
lidanqing-intel added a commit that referenced this pull request Jun 21, 2022
…s outputs (#43297)

* fix some matmul that X and Y both other ops outputs, do not dequantize the Y.

* fix CI format

* fix according to review
lidanqing-intel added a commit to lidanqing-intel/Paddle that referenced this pull request Jun 22, 2022
…s outputs (PaddlePaddle#43297)

* fix some matmul that X and Y both other ops outputs, do not dequantize the Y.

* fix CI format

* fix according to review
ZeyuChen pushed a commit that referenced this pull request Jun 23, 2022
* Correct elementwise quantization (#43693)

* [Bug fix] Do not quantize weights Y when matmul X and Y both other ops outputs (#43297)

* fix some matmul that X and Y both other ops outputs, do not dequantize the Y.

* fix CI format

* fix according to review

Co-authored-by: joanna.wozna.intel <joanna.wozna@intel.com>
@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