Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logs
Browse files Browse the repository at this point in the history
Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
jantonguirao committed Jul 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3f86113 commit 82fa82f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dali/core/cuda_event_pool.cc
Original file line number Diff line number Diff line change
@@ -36,8 +36,11 @@ CUDAEvent CUDAEventPool::Get(int device_id) {
CUDA_CALL(cudaGetDevice(&device_id));

CUDAEvent ev = GetFromPool(device_id);
if (!ev)
if (!ev) {
std::cout << make_string("CUDAEvent::CreateWithFlags(..., ", device_id, ")\n");
return CUDAEvent::CreateWithFlags(event_flags_, device_id);
}
std::cout << make_string("CUDAEventPool::Get(", device_id, ")\n");
return ev;
}

@@ -68,6 +71,7 @@ CUDAEvent CUDAEventPool::GetFromPool(int device_id) {
}

void CUDAEventPool::Put(CUDAEvent &&event, int device_id) {
std::cout << make_string("CUDAEventPool::Put(", device_id, ")\n");
if (device_id < 0)
cudaGetDevice(&device_id);

0 comments on commit 82fa82f

Please sign in to comment.