!14107 [MD][GPU] Fix gpu core dump when dataset send more batches than gpu used.

From: @xiefangqi
Reviewed-by: 
Signed-off-by:
pull/14107/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit a2041d34e6

@ -391,7 +391,13 @@ Status DeviceQueueOp::PushDataToGPU() {
break;
}
if (!TaskManager::FindMe()->Interrupted() && !GpuBufferMgr::GetInstance().IsClosed()) {
RETURN_IF_NOT_OK(gpu_item_connector_->Pop(0, &items));
auto rc = gpu_item_connector_->Pop(0, &items);
// If the batches send by dataset are more than gpu calculate, gpu will core for no signal notify.
if (rc.IsError()) {
GpuBufferMgr::GetInstance().Close(handle);
GpuBufferMgr::GetInstance().CloseConfirm();
return rc;
}
} else {
break;
}

Loading…
Cancel
Save