Skip to content

Commit

Permalink
Merge pull request #34725 from fwyzard/CUDA_fix_concurrent_EventSetup…
Browse files Browse the repository at this point in the history
…_filling

Fix uploading EventSetup conditions from multiple CUDA streams
  • Loading branch information
cmsbuild committed Aug 3, 2021
2 parents e43392f + 03b30c3 commit 0f91c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HeterogeneousCore/CUDACore/interface/ESProduct.h
Expand Up @@ -75,6 +75,9 @@ namespace cms {
transferAsync(data.m_data, cudaStream);
assert(data.m_fillingStream == nullptr);
data.m_fillingStream = cudaStream;
// Record in the cudaStream an event to mark the readiness of the
// EventSetup data on the GPU, so other streams can check for it
cudaCheck(cudaEventRecord(data.m_event.get(), cudaStream));
// Now the filling has been enqueued to the cudaStream, so we
// can return the GPU data immediately, since all subsequent
// work must be either enqueued to the cudaStream, or the cudaStream
Expand Down

0 comments on commit 0f91c34

Please sign in to comment.