From a3190ad5fa5af8d1c6570db3c92710d658293092 Mon Sep 17 00:00:00 2001 From: zhanglirong1999 <1695074375@qq.com> Date: Fri, 10 Nov 2023 18:31:51 +0800 Subject: [PATCH] add ifdef PADDLE_WITH_DNNL --- paddle/fluid/inference/api/analysis_config.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/api/analysis_config.cc b/paddle/fluid/inference/api/analysis_config.cc index 476fc050348685..e41cb9e97cca39 100644 --- a/paddle/fluid/inference/api/analysis_config.cc +++ b/paddle/fluid/inference/api/analysis_config.cc @@ -937,10 +937,11 @@ void AnalysisConfig::Update() { *static_cast(pass_builder_.get())); } } - +#ifdef PADDLE_WITH_DNNL if (!use_gpu() && !use_xpu() && !use_ipu() && !use_mkldnn_) { pass_builder()->DisableMKLDNN(); } +#endif if (use_tensorrt_) { pass_builder()->ClearPasses();