Browse Source

!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 Gitee 4 years ago
parent
commit
a2041d34e6
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc

+ 7
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc View File

@@ -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