From 253e664275d4c046e2b4f41d36d43806c25fd112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Gallus?= Date: Fri, 20 Dec 2019 03:26:02 +0100 Subject: [PATCH] Disable memory opt pass when DNNL is on (#21826) * Disable memory opt pass when DNNL is on * Refine comment above mem optimization pass enablement test=develop --- paddle/fluid/inference/api/analysis_config.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/api/analysis_config.cc b/paddle/fluid/inference/api/analysis_config.cc index 398b51e321..f6048449bc 100644 --- a/paddle/fluid/inference/api/analysis_config.cc +++ b/paddle/fluid/inference/api/analysis_config.cc @@ -324,8 +324,8 @@ void AnalysisConfig::Update() { } #ifdef PADDLE_WITH_MKLDNN - // Do not optimize before quantization - if (enable_memory_optim_ && !use_mkldnn_quantizer_) { + // Do not optimize when mkldnn is on + if (enable_memory_optim_ && !use_mkldnn_) { #else if (enable_memory_optim_) { #endif -- GitLab