From 96e58f874d6769544f80618e19fa4da616cbac8f Mon Sep 17 00:00:00 2001 From: Wilber Date: Sun, 11 Dec 2022 10:17:55 +0800 Subject: [PATCH] fix for mkldnn (#48852) --- paddle/fluid/inference/api/analysis_config.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/paddle/fluid/inference/api/analysis_config.cc b/paddle/fluid/inference/api/analysis_config.cc index c7554de9df73b..1224caf88e668 100644 --- a/paddle/fluid/inference/api/analysis_config.cc +++ b/paddle/fluid/inference/api/analysis_config.cc @@ -948,12 +948,7 @@ void AnalysisConfig::Update() { #endif } -#ifdef PADDLE_WITH_MKLDNN - // Do not optimize when mkldnn is on - if (enable_memory_optim_ && !use_mkldnn_) { -#else if (enable_memory_optim_) { -#endif pass_builder()->AppendAnalysisPass("memory_optimize_pass"); }