From cdb36da4ccd38dff239101f66766ac25354efe5b Mon Sep 17 00:00:00 2001 From: Sylwester Fraczek Date: Fri, 2 Sep 2022 13:49:45 +0200 Subject: [PATCH] enable add passes pre-calculating scales/quantizing weights (#44680) --- paddle/fluid/inference/api/paddle_pass_builder.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/inference/api/paddle_pass_builder.cc b/paddle/fluid/inference/api/paddle_pass_builder.cc index b1b101c6357..0b7982950f4 100644 --- a/paddle/fluid/inference/api/paddle_pass_builder.cc +++ b/paddle/fluid/inference/api/paddle_pass_builder.cc @@ -415,6 +415,8 @@ void CpuPassStrategy::EnableMkldnnInt8() { passes_.push_back("cpu_quantize_placement_pass"); passes_.push_back("cpu_quantize_pass"); passes_.push_back("cpu_quantize_squash_pass"); + passes_.push_back("int8_scale_calculation_mkldnn_pass"); + passes_.push_back("params_quantization_mkldnn_pass"); passes_.push_back("mkldnn_inplace_pass"); passes_.push_back("runtime_context_cache_pass"); } -- GitLab