未验证 提交 1cfbcb14 编写于 作者: D danleifeng 提交者: GitHub

fix exit bug for heterps;test=develop (#33724)

上级 e5a6bb1d
......@@ -209,6 +209,15 @@ class PSGPUWrapper {
void EndPass() { HeterPs_->end_pass(); }
void ShowOneTable(int index) { HeterPs_->show_one_table(index); }
void Finalize() {
VLOG(3) << "PSGPUWrapper Begin Finalize.";
if (s_instance_ == nullptr) {
return;
}
s_instance_ = nullptr;
VLOG(3) << "PSGPUWrapper Finalize Finished.";
}
private:
static std::shared_ptr<PSGPUWrapper> s_instance_;
Dataset* dataset_;
......
......@@ -48,6 +48,8 @@ void BindPSGPUWrapper(py::module* m) {
.def("end_pass", &framework::PSGPUWrapper::EndPass,
py::call_guard<py::gil_scoped_release>())
.def("build_gpu_ps", &framework::PSGPUWrapper::BuildGPUPS,
py::call_guard<py::gil_scoped_release>())
.def("finalize", &framework::PSGPUWrapper::Finalize,
py::call_guard<py::gil_scoped_release>());
} // end PSGPUWrapper
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册