Device status

Hello Forum,

As a corollary to an earlier post where I learned that the GPU device being used for display purposes will hold up the CPU… is there any way of knowing via the CUDA API if a device is currently used as a display GPU, and thereby avoid using it?

Thanks again.

Use cudaGetDeviceProperties to obtain a cudaDeviceProp structure and check the value of kernelExecTimeoutEnabled. Display GPUs have a watchdog timer to abort your kernel after ~5 seconds to allow the display to update.

Thank you for the response.

I had seen this strategy in another post and tried to use it but, for whatever reason, all my GPUs have that disabled – even the one that is being used for my display! I know that the NVIDIA control panel “knows” when I am using one GPU vs another so I am liable to believe that there is a way of detecting this. However The CUDA API does not appear to have it and there is no other property I can see that suggests this condition.

If your display GPU does not have kernelExecTimeoutEnabled, then there is almost certainly some kind of driver bug. Can you run the deviceQuery sample program and check the output?

Also, what OS, CUDA driver and toolkit version are you using?

I bet you installed NSight, and I bet it disabled TDR.