Skip to content

Commit

Permalink
fix analysis_predictor when func is called multiple times, test=relea…
Browse files Browse the repository at this point in the history
…se/1.6 (#21663)
  • Loading branch information
Shixiaowei02 committed Dec 16, 2019
1 parent 2de1029 commit 70c073a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 70c073a

Please sign in to comment.