Reputation: 3197
Is cudaEvent related to CUDA context? Do we need to call cudaSetDevice before calling cudaEventCreate or cudaEventDestroy?
I'm aware that cudaStreamWaitEvent can be called on another device.
But can we call cudaEventRecord or cudaEventDestroy on another device other than the device that the event is created?
Upvotes: 0
Views: 300
Reputation: 151849
Is cudaEvent device specific?
Yes. From the documentation:
streams and events are created in association with the currently set device. If no call to cudaSetDevice() is made, the current device is device 0.
Upvotes: 1