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

Add fusion_gru and multi_gru to PTQ (Post-Training Quantization) #33749

Merged
merged 11 commits into from
Aug 27, 2021

Conversation

wozna
Copy link
Contributor

@wozna wozna commented Jun 23, 2021

PR types

New features

PR changes

OPs

Describe

This PR:

  • adds support for fusion_gru and multi_gru to Post-Training Quantization process
  • adds gathering scales based on the max absolute value per output channel for fusion_gru/multi_gru operators
  • adds GRU model test for PTQ for with multi_gru_fuse_pass and without it
  • fix in the requantize operator so that there is no hard-coded data format but that it is set based on input

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jul 9, 2021

Sorry to inform you that 3b67f94's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@wozna
Copy link
Contributor Author

wozna commented Jul 20, 2021

I have a problem that in PR-CI-Coverage for file paddle/fluid/inference/api/mkldnn_quantizer.cc coverage is 0% even if all UT added in this PR run this code multiple times. I added the same changes in PR #33912 where I added a few prints and made the test not pass, then everything is written in the log and as you can see in the logs in PR-CI-Coverage the tests go through these parts of the code. I still don't know why only this file has line coverage equal to 0.

Copy link
Contributor

@lidanqing-intel lidanqing-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@wozna
Copy link
Contributor Author

wozna commented Aug 27, 2021

The recent changes are related to cmake files. It turned out that mkldnn_quantizer.cc was duplicated. It was added to the analysis_predictor library and then it was separately added to the paddle_inference_shared library where the analysis_predictor library was added as a dependency. That's why I left this file only in analysis_predictor lib.

@jczaja jczaja merged commit 7debae3 into PaddlePaddle:develop Aug 27, 2021
@wozna wozna deleted the gru_ptq branch February 24, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants