[CUDA] Make CudaEvent work with multi-device (#2614)

* Set current device when creating cuda event

* Separate cuda events by device

* Avoid race condition in pool
This commit is contained in:
Cheng
2025-09-27 11:27:17 +09:00
committed by GitHub
parent 7a6adda1e6
commit b466dea982
7 changed files with 73 additions and 26 deletions

View File

@@ -140,7 +140,7 @@ class Device {
Device(const Device&) = delete;
Device& operator=(const Device&) = delete;
// Make this device the current cuda device, required by some cuda calls.
// Make this device the current cuda device, this method is thread-safe.
void make_current();
CommandEncoder& get_command_encoder(Stream s);