Has anyone managed to use delay loading dll for cuda runtime dll, cudart.dll?
I have a module implementing some functionalities in cuda and I would like to be able to check all necessary cuda files (nvcuda.dll, cudart.dll). If any of these files is missing the application shouldn’t crash, but run the CPU alternative.
This is why I’ve tried using delay loading for cudart.dll and calling __HrLoadAllImportsForDll( “cudart.dll” ) before using and cuda function. But, even if no cuda functions has been called yet, if cudart.dll is absent, the application throws an exception before getting the change to call __HrLoadAllImportsForDll( “cudart.dll” ).
Any help would be greatly appreciated.