diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index f3fbb1d4d3442a417f743351f8b2f4dcadbb4d54..c68b1f719d1f5d0fad031d76598af3e67d6f5af5 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -122,11 +122,7 @@ bool AnalysisPredictor::PrepareScope( scope_ = parent_scope; status_is_cloned_ = true; } else { - if (config_.use_gpu_) { - paddle::framework::InitDevices(false); - } else { - paddle::framework::InitDevices(false, {}); - } + paddle::framework::InitDevices(false); scope_.reset(new paddle::framework::Scope()); status_is_cloned_ = false; }