which is GPU is running my CUDA code

Hello Guys,

I am confused about which GPU card is actually running my CUDA code…

I have 2 teslas and 1 Guadro FX5800 in my computer. My cuda code is complied and generating correct results. But I really have no clue which GPU is doing the job…

Could anyone give me some hint to find it out?

Thanks!

The quick and dirty way is to watch the temperatures of each GPU. The one that goes up during the application run is the active GPU. But both CUDA APIs include calls that let you identify the gpu you are running on, and it is trivial to call cudaGetDevice() and then cudaGetDeviceProperties() (or the runtime API equivalents) so that your code can tell you which GPU it is using.

Thanks Man!