Skip to content

Commit

Permalink
add ifdef PADDLE_WITH_DNNL
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglirong1999 committed Nov 10, 2023
1 parent a1c1907 commit a3190ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/fluid/inference/api/analysis_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,11 @@ void AnalysisConfig::Update() {
*static_cast<CpuPassStrategy *>(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();
Expand Down

0 comments on commit a3190ad

Please sign in to comment.