From 498dbfa8c55af592b74eaee543a5dace8531f068 Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Wed, 10 Nov 2021 17:24:13 +0100 Subject: [PATCH] - Enable FC int8 (#37078) --- .../tests/api/analyzer_int8_image_classification_tester.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/inference/tests/api/analyzer_int8_image_classification_tester.cc b/paddle/fluid/inference/tests/api/analyzer_int8_image_classification_tester.cc index 6bfa8a821a..8f8b730442 100644 --- a/paddle/fluid/inference/tests/api/analyzer_int8_image_classification_tester.cc +++ b/paddle/fluid/inference/tests/api/analyzer_int8_image_classification_tester.cc @@ -47,6 +47,10 @@ TEST(Analyzer_int8_image_classification, quantization) { std::shared_ptr> warmup_data = 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 q_cfg.EnableMkldnnQuantizer(); q_cfg.mkldnn_quantizer_config()->SetWarmupData(warmup_data); -- GitLab