forked from mindspore-Ecosystem/mindspore
!2349 fix gpu invalid input data
Merge pull request !2349 from panfengfeng/fix_gpu_invalid_input_data
This commit is contained in:
commit
dffbe6edfc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue