提交 49c1eea1 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!3964 Modify interface of open and close of TDT

Merge pull request !3964 from hanjun996/master
...@@ -192,7 +192,7 @@ bool MsContext::OpenTsd() { ...@@ -192,7 +192,7 @@ bool MsContext::OpenTsd() {
} }
MS_LOG(INFO) << "Device id = " << device_id << ", rank size = " << rank_size << "."; MS_LOG(INFO) << "Device id = " << device_id << ", rank size = " << rank_size << ".";
TDT_StatusT status = tdt::TsdClient::GetInstance()->Open(device_id, rank_size); TDT_StatusT status = TsdOpen(device_id, rank_size);
if (status != TDT_OK) { if (status != TDT_OK) {
MS_LOG(EXCEPTION) << "Device " << device_id << " is occupied, open tsd failed, status = " << status << "."; MS_LOG(EXCEPTION) << "Device " << device_id << " is occupied, open tsd failed, status = " << status << ".";
return false; return false;
...@@ -238,7 +238,9 @@ bool MsContext::CloseTsd(bool force) { ...@@ -238,7 +238,9 @@ bool MsContext::CloseTsd(bool force) {
MS_LOG(ERROR) << "tdt thread join failed: " << e.what(); MS_LOG(ERROR) << "tdt thread join failed: " << e.what();
} }
#endif #endif
TDT_StatusT status = tdt::TsdClient::GetInstance()->Close(); unsigned int device_id;
device_id = device_id_;
TDT_StatusT status = TsdClose(device_id);
if (status != TDT_OK) { if (status != TDT_OK) {
MS_LOG(EXCEPTION) << "Close tsd failed, status = " << status << "."; MS_LOG(EXCEPTION) << "Close tsd failed, status = " << status << ".";
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册