Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions HeterogeneousCore/CUDAServices/src/CachingHostAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,6 @@ struct CachingHostAllocator
}
}

// Unlock
mutex.Unlock();

if (CubDebug(error = cudaGetDevice(&entrypoint_device))) return error;
if (entrypoint_device != search_key.device) {
if (CubDebug(error = cudaSetDevice(search_key.device))) return error;
Expand All @@ -550,7 +547,11 @@ struct CachingHostAllocator
// Insert the ready event in the associated stream (must have current device set properly)
if (CubDebug(error = cudaEventRecord(search_key.ready_event, search_key.associated_stream))) return error;
}
else

// Unlock
mutex.Unlock();

if (!recached)
{
// Free the allocation from the runtime and cleanup the event.
if (CubDebug(error = cudaFreeHost(d_ptr))) return error;
Expand Down