Mouhcine Amira
Mouhcine Amira

Reputation: 19

how to export CUDA (jcuda) program

I just developped my first program with JCUDA (on eclipse) and i want to execute it on other machines that don't have the same nvidia-driver and compilers i used to develop it.

How can I export just the executable to another machine and execute it without recompiling the code ?

Any help will be appreciated

Upvotes: 1

Views: 220

Answers (1)

Marco13
Marco13

Reputation: 54611

(Sorry, this may not fully answer your question if you expected a step-by-step-manual. I'll consider doing some experiments here, and maybe extend this answer or add the information on the website)


For the driver API, the CUDA version on the target system must at least be that of the corresponding JCuda version - otherwise, newer CUDA functions would simply not be supported.

Regarding the runtime libraries, quoting from the CUDA FAQ:

Q: What do I need to distribute my CUDA application?

Applications that use the driver API only need the CUDA driver library ("nvcuda.dll" under Windows), which is included as part of the standard NVIDIA driver install.

Applications that use the runtime API also require the runtime library ("cudart.dll" under Windows), which is included in the CUDA Toolkit. It is permissible to distribute this library with your application under the terms of the End User License Agreement included with the CUDA Toolkit.

So in doubt, you may include the "cudart.dll" that you used for compiling your application into the distribution package.

Newer versions of CUDA also support static linking against the runtime DLL, but this is not (yet?) done for the JCuda runtime library.

Upvotes: 2

Related Questions