First, I made a simple CUDA program which works fine but when I try to do a DLL, the program running but stops at this line :
[indent]cutilSafeCall(cudaMallocPitch(&cu_fTemp, &pitch, iDim*sizeof(float), iDim));[/indent]with this error : “cudaSafeCall() Runtime API error : unspecified driver error”.
If I don’t use cudaMallocPitch but cudaMallocArray, there is the same problem…
I have a gtx275 and I work with VS 2008 on Windows 7.
I’m doing the same thing in my library and it works fine. I grouped all GPU functions in a DLL which creates a thread for each GPU found in the computer so that only 1 thread handles all function calls for that GPU. I use all kinds of memory (textures, global, shared) and it works fine.
Maybe you can try in a different OS or something. I’m using CUDA 3.0 with driver 197.13 on Windows XP (32 bits) and it (nearly) works fine. OK I have some problems with function calls disabling OpenMP but that’s another story; GPU implementation itself works fine.