forked from mindspore-Ecosystem/mindspore
call closeTsd when cxx lib exit
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
bad3862f27
commit
7534916059
|
@ -117,6 +117,16 @@ Status MsGraphImpl::FinalizeEnv() {
|
|||
session::ExecutorManager::Instance().Clear();
|
||||
device::KernelRuntimeManager::Instance().ClearRuntimeResource();
|
||||
|
||||
auto ms_context = MsContext::GetInstance();
|
||||
if (ms_context == nullptr) {
|
||||
MS_LOG(ERROR) << "Get Context failed!";
|
||||
return FAILED;
|
||||
}
|
||||
if (!context::CloseTsd(ms_context)) {
|
||||
MS_LOG(ERROR) << "CloseTsd failed!";
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
init_flag_ = false;
|
||||
MS_LOG(INFO) << "End finalize env";
|
||||
return SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue