I’m trying to use cudaGetDeviceCount in order to check the availability of my NVIDIA 8800 GTX card. As I’ve only one card I expect that function to return either 0 or 1.
Maybe I’m not understanding very well the concept of “availability” but my point of view is that one device (card) is available if there’s no other kernel running on it. However, if there is one kernel running on the GPU and I call to cudaGetDeviceCount from another application, that function always returns 1, meaning the card is available when in fact it isn’t.
I’m doing some research on runtime adaptation and I need to check whether the GPU is being used or is free. Is cudaGetDeviceCount the way to check for that kind of “availability”? Otherwise, is there something else I could use?
Thanks in advance,