Skip to content

Commit eb965f6

Browse files
Merge pull request #50280 from nouiz:upstream_cuda_malloc_async_oom_deadlock
PiperOrigin-RevId: 379949863 Change-Id: Icc5fc36016731b3ad6b5c93bd3c98711826c2ff7
2 parents 9c70f6b + eff4f1a commit eb965f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tensorflow/core/common_runtime/gpu/gpu_cudamallocasync_allocator.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ GpuCudaMallocAsyncAllocator::GpuCudaMallocAsyncAllocator(
195195
#endif // TF_CUDA_MALLOC_ASYNC_SUPPORTED
196196
}
197197

198-
GpuCudaMallocAsyncAllocator::~GpuCudaMallocAsyncAllocator() {
199-
}
198+
GpuCudaMallocAsyncAllocator::~GpuCudaMallocAsyncAllocator() {}
200199

201200
void* GpuCudaMallocAsyncAllocator::AllocateRaw(size_t alignment,
202201
size_t num_bytes) {
@@ -215,7 +214,6 @@ void* GpuCudaMallocAsyncAllocator::AllocateRaw(size_t alignment,
215214
num_bytes, pool_, cuda_stream_)) {
216215
size_t free, total;
217216
cuMemGetInfo(&free, &total);
218-
mutex_lock lock(lock_);
219217
LOG(ERROR) << Name() << " cuMemAllocAsync failed to allocate " << num_bytes
220218
<< ": " << GetCudaErrorMessage(result)
221219
<< "\n Free memory/Total memory: " << free << "/" << total;

0 commit comments

Comments
 (0)