[this is my first post on NVidia forums. I have seen my question asked several times in 2008 and 2009 by other people, but could not find any positive answer. Maybe things have changed now in 2011].
I would like to develop a program that runs on Windows, and which optimizes computing with the Cuda Runtime API, IF AND ONLY IF a Cuda-enabled GPU is available.
My problem is that if Cuda is not available, the Cudart DLL cannot be loaded (because not found by the OS), and the program does not even start.
I have seen that the Driver API could make a delayed load of nvcuda.dll, but in 2008 or 2009, this apparently was not working with cudart.dll. And my code, using the Runtime API, is working fine (well, when Cuda is available only), so I would definitely prefer not to rewrite it on the Driver API.
So my questions are:
is there a way to distribute a Cudart.dll file with my program, that would let the program start, and from which the cudaXxxx functions would return an error if Cuda is not available? (in which case I would branch execution to some CPU-based slower computing)
or, is there a way to delay-load Cudart.dll and use the Cuda Runtime API?
Thanks in advance for your help,