I have multiple GPUs in the machine. I am launching each kernel on a separate stream on a separate GPU device.
I want to place a printf in the kernel code that prints debugging information that includes the device ID of the GPU on which the kernel is running.
Is there a cuda function that can be executed by a kernel that returns the device Id on which it is running?