I am a newbie to cuda multi-gpu programming. I started a bunch of threads. Each thread does a SetDevice(device_number) then runs a bunch of code. After the code is run I want to confirm that it ran on the GPU it was supposed to have run on. Is there a command to use to check/see/confirm what is the GPU device number currently in use by my program in the current thread?
cudaGetDevice(int *device) will give you the current device in your host thread.