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

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

上级 2de10293
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册