Redistributing DLL with CUDA

Forgive me if this question has already been answered, but if I compile my CUDA code into a DLL and distribute it to others, will they also need to install the CUDA SDK + Toolkit, or do they just need the latest nVidia drivers (plus a compatible card)?

Whenever I get CUDA working (compiling correctly) on my box, I would like to port a bit of code and compile it to a DLL that will serve as a drop-in replacement for an existing DLL. I don’t want to have the users go download something else on top of it, if possible.

This should be part of the FAQ:

The CUDA driver (nvcuda.dll) is distributed as part of the standard NVIDIA driver install.

The CUDA runtime (cudart.dll) is distributed in the CUDA Toolkit. If your application is using the runtime (as opposed to just the driver API) you need to also distribute this dll (check the license).

I believe we are planning on changing the CUDA runtime to be statically linked to avoid problems with incompatible versions.

In the EULA.txt file, the following is found:

So in essence it would be against the license to copy cudart.dll separately from the whole CUDA SDK. I think we need a clear answer from nVidia on this issue.

Also, should redistribution of cudart.dll be allowed, it should have different file names for different CUDA versions (e.g. cudart20.dll) otherwise there may be (will be, thanks to Murphy’s law) a clash between cudart.dll installed by different applications.

Well, most of my applications will be using the driver methods, so it looks like I’m safe just distributing the DLL for my library (given that the user already has the drivers installed).

You should also consider to add a function called cudaGetVersion() so we can know if CUDA is not present, if it’s the 1.1 or the 2.0, etc…