From de856a1bac8ac3678bf2e38321545a30a722dd21 Mon Sep 17 00:00:00 2001 From: xiefangqi Date: Thu, 25 Mar 2021 19:02:36 +0800 Subject: [PATCH] md fix gpu core dump problem --- .../minddata/dataset/engine/datasetops/device_queue_op.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc index 0139fdcb78..644b791803 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc @@ -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; }