Export C DLL library using Cuda Export C DLL

I’m trying to create an exportable C library DLL so that I can use the Cuda engine to accelerate algorithms that I can use from C# apps. I used the regular C syntax to make an exportable C funtion from a DLL and created a C# app to use it. I can run in debug mode and see it step into the C function just fine, but it crashes on the first Cuda function it hits. Does anyone know of any tricks to get this to work? The demo that I created worked fine when it was an executable, and the export code seems to work fine because I can step into the library from the C# app. The problem seems to be that Cuda isn’t being initialized properly when used inside a dll (?). Any help would be appriciated. Thanks

I’m running into the same problems. If I compile as an .exe, my code runs fine, but if I compile as a .dll, the same code crashes. If I comment out the cuda-specific code and just call simple dummy functions, then my DLL runs fine. With the cuda code in place, sometimes the DLL crashes my calling application when I first load the DLL, before explicitly calling any exported functions, while other times it doesn’t crash until the host application invokes a function in the DLL which calls cuda code. But in either case, I’m never able to run cuda code which is inside of a dll. Has anyone made this work – putting all the CUDA / GPU code in a .dll, with the host application unaware of the GPU’s presence?

It is a known bug that has been fixed.
You will need to wait for the next release.

When is the next release and what will be the release number?

Thanks in advance

Kadem