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

!2349 fix gpu invalid input data

Merge pull request !2349 from panfengfeng/fix_gpu_invalid_input_data
......@@ -232,13 +232,17 @@ Status DeviceQueueOp::RetryPushGPUData(const std::vector<size_t> &data_size, con
while (!GpuBufferMgr::GetInstance().IsClosed() && !TaskManager::FindMe()->Interrupted()) {
RETURN_IF_NOT_OK(MallocForGPUData(&items, curr_row));
auto ret = GpuBufferMgr::GetInstance().Push(handle, items, WAIT_TIME);
BlockQueueStatus_T ret = GpuBufferMgr::GetInstance().Push(handle, items, WAIT_TIME);
if (ret) {
for (int i = 0; i < items.size(); i++) {
free(items[i].data_ptr_);
}
MS_LOG(WARNING) << "Retry pushing data...";
continue;
if (ret == BlockQueueStatus_T::ERROR_INPUT) {
return Status(StatusCode::kUnexpectedError, __LINE__, __FILE__, "invalid input Data, please check it.");
} else {
MS_LOG(WARNING) << "Retry pushing data...";
continue;
}
} else {
break;
}
......
......@@ -25,11 +25,11 @@
#ifdef ENABLE_TDTQUE
#include "dataset/engine/tdt/tdt_plugin.h"
#endif
#ifdef ENABLE_GPUQUE
#include "device/gpu/gpu_buffer_mgr.h"
using mindspore::device::BlockQueueStatus_T;
using mindspore::device::GpuBufferMgr;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册