From b0074e158b198c8b285993b382c2921d8d9a0728 Mon Sep 17 00:00:00 2001 From: Sergei Nikolaev Date: Thu, 28 Jan 2016 16:57:15 -0800 Subject: [PATCH] 200169109 fix --- src/caffe/util/gpu_memory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/caffe/util/gpu_memory.cpp b/src/caffe/util/gpu_memory.cpp index da990b88af0..92f2a6764c8 100644 --- a/src/caffe/util/gpu_memory.cpp +++ b/src/caffe/util/gpu_memory.cpp @@ -88,6 +88,8 @@ namespace caffe { } // retry once CUDA_CHECK(cubAlloc->DeviceAllocate(ptr, size, stream)); + // If retry succeeds we need to clean up last error: + cudaGetLastError(); } break; default: