Run cuda exe on other computers

Hi guys!

I compile and run cuda programs on my own computer on which I have installed all cuda stuff.

Now I want to execute cuda programs on computer which have not cuda stuff installed. Is it possible?
Maybe by linking libraries to my exe… But how?

Any ideas?

Thanks

Are you using the driver API or runtime API? If you’re using the driver API, an up-to-date nvidia driver must be installed on the target machine. If you’re using the runtime api, you additionally need to deliver “libcudart.so” with your application.

How can I determine if I am using the driver API or the runtime API? I thought the runtime was just an interface between my application and the GPU, and my exe was using the driver to execute itself… External Image

cuda*() == runtime api == libcudart

cu*() == driver api == libcuda.

The runtime is a convenience layer on top of the driver.

Does that help clear it up for you?

–Cliff

Yes, it’s really clear for me now. So, because I use functions with cuda prefix, I use the runtime api.

So if I correctly understand the Tobi_W’s post, I need to link the library called libcudart.so with my executable. So I use the following commands :

nvcc -c deviceQuery.cu

nvcc -o exe -L/usr/include/cuda/lib -I/usr/include/cuda/include devideQuery.o -libcudart

Then I try to run my exe on an other computer which has not CUDA installed, but I have the following error :

Any ideas??

Yes, but libcudart.so is a shared library (as indicated by the .so suffix)… hence it is dynamically linked to your application rather than being statically linked. In short, your application requires libcudart.so to be present on the target system in addition to the application executable itself. You can accomplish this either by installing the CUDA Toolkit on the target computer or by redistributing libcudart.so with your application (which is explicitly allowed by the CUDA Toolkit’s EULA – see the ATTACHMENT A section at the end of EULA.txt in the doc subdirectory of the toolkit.)

Note that either way you’ll also need the NVIDIA driver (which includes the CUDA driver) to be installed on the target computer for the CUDA Runtime to be able to work.