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 cpu_quantize_placement_pass for C-API quantization #16265

Merged

Conversation

wojtuss
Copy link

@wojtuss wojtuss commented Mar 18, 2019

The cpu_quantize_placement_pass is a pass that is run after all graph optimization passes and before quantization passes to apply quantization strategy by setting the use_quantizer attribute to true for operators which are to be quantized.

This pass is a part of INT8v2 approach with the core implementation submitted in PR #15987.

test=develop

REGISTER_PASS(cpu_quantize_placement_pass,
paddle::framework::ir::CPUQuantizePlacementPass)
.RequirePassAttr("quantize_enabled_op_types")
.RequirePassAttr("quantize_excluded_op_ids");
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some description for quantize_enabled_op_types and quantize_excluded_op_ids?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit af03008 into PaddlePaddle:develop Mar 19, 2019
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.

None yet

2 participants