Disable CUDA on specific cards

How can I disable CUDA on specific cards so API does not return them? For Windows Vista.
Thanks

There’s a way to do that in 3.1.

Thank you for answer. There is currently only 3.0 so I must wait probably.
Can you indicate whether I will have to code application or there will be some utility?

I would like to disable CUDA on specific adapters so it is disabled for other apps. E.g. I have GTX 295 (id 1 and 2) and 9800 GTX (id 3) and I would like to disable GTX 295 and have it only for 9800GTX.

you set an environment variable (CUDA_VISIBLE_DEVICES) equal to the list of adapters you want to see. so, CUDA_VISIBLE_DEVICES=3 ./application would result in your application seeing the 9800 GTX as device 0.

This is cool. Thanks!!!

It is working, this variable is luxurious. Thank you very much that it is working as you “promissed”.
Exactly what I wanted.

PS:
It is indexed from 0, so I have CUDA_VISIBLE_DEVICES=2 to enable only that third card.

It is working, this variable is luxurious. Thank you very much that it is working as you “promissed”.
Exactly what I wanted.

PS:
It is indexed from 0, so I have CUDA_VISIBLE_DEVICES=2 to enable only that third card.