未验证 提交 498dbfa8 编写于 作者: J Jacek Czaja 提交者: GitHub

- Enable FC int8 (#37078)

上级 99f9224c
...@@ -47,6 +47,10 @@ TEST(Analyzer_int8_image_classification, quantization) { ...@@ -47,6 +47,10 @@ TEST(Analyzer_int8_image_classification, quantization) {
std::shared_ptr<std::vector<PaddleTensor>> warmup_data = std::shared_ptr<std::vector<PaddleTensor>> warmup_data =
paddle::inference::GetWarmupData(input_slots_all); paddle::inference::GetWarmupData(input_slots_all);
// INT8 implies FC oneDNN passes to be used
q_cfg.pass_builder()->AppendPass("fc_mkldnn_pass");
q_cfg.pass_builder()->AppendPass("fc_act_mkldnn_fuse_pass");
// configure quantizer // configure quantizer
q_cfg.EnableMkldnnQuantizer(); q_cfg.EnableMkldnnQuantizer();
q_cfg.mkldnn_quantizer_config()->SetWarmupData(warmup_data); q_cfg.mkldnn_quantizer_config()->SetWarmupData(warmup_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册