I’m developing an application that allows to load/unload CUDA codes from DLL manually. It works perfectly for the first DLL load, and has no problem if it continues calling CUDA codes. The problem happens when I unload and reload the DLL. All kernel codes are failed with error: invalid device function. On unload, all DLL’s allocated memory & texture are freed and unbinded, and cudaDeviceReset()'s also called to make sure there is nothing remains. It seems to me that the kernel codes are not loaded and/or mapped correctly when reloading. So, is there any option or CUDA function that I have to set/call to overcome this situation?
My system information:
- Card: GTX690
- LIB: CUDA 5.0
- IDE: VS2010
- SYS: Win7 64bit
Thanks,
LD