From 4a368a4901577b6cb86f5673c440deceef7c6852 Mon Sep 17 00:00:00 2001 From: Wojciech Uss Date: Fri, 19 Oct 2018 04:09:24 +0200 Subject: [PATCH] add ifdef guard for MKL-DNN placement pass test=develop --- paddle/fluid/inference/analysis/analyzer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/inference/analysis/analyzer.cc b/paddle/fluid/inference/analysis/analyzer.cc index 61d29d092e0..2e79d495d5f 100644 --- a/paddle/fluid/inference/analysis/analyzer.cc +++ b/paddle/fluid/inference/analysis/analyzer.cc @@ -101,10 +101,12 @@ Analyzer::Analyzer() { Register("manager1", new DfgPassManagerImpl); } void Analyzer::Run(Argument* argument) { std::vector passes; +#ifdef PADDLE_WITH_MKLDNN if (use_mkldnn_) { VLOG(3) << "Adding MKL-DNN placement pass"; passes.push_back("mkldnn_placement_pass"); } +#endif for (auto& pass : ir_passes_) { if (!disabled_ir_passes_.count(pass)) { passes.push_back(pass); -- GitLab