未验证 提交 70c073a0 编写于 作者: 石晓伟 提交者: GitHub

fix analysis_predictor when func is called multiple times, test=release/1.6 (#21663)

上级 2de10293
...@@ -122,11 +122,7 @@ bool AnalysisPredictor::PrepareScope( ...@@ -122,11 +122,7 @@ bool AnalysisPredictor::PrepareScope(
scope_ = parent_scope; scope_ = parent_scope;
status_is_cloned_ = true; status_is_cloned_ = true;
} else { } else {
if (config_.use_gpu_) { paddle::framework::InitDevices(false);
paddle::framework::InitDevices(false);
} else {
paddle::framework::InitDevices(false, {});
}
scope_.reset(new paddle::framework::Scope()); scope_.reset(new paddle::framework::Scope());
status_is_cloned_ = false; status_is_cloned_ = false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册