Can I install CUDA without drivers in Linux CentOS 6 (only cuda toolkit)

c++, cuda, linux

Solution

You can install the CUDA toolkit without installing the driver.

You can then compile CUDA codes that use the runtime API.

You will not be able to run those codes unless you have a proper CUDA driver and GPU installed in the machine, however.

Codes that depend on the driver API will also not be compilable in this configuration, on older CUDA toolkits, without additional work. Newer CUDA toolkits provide stub libraries for driver libraries, which can be linked against.

This answer covers the method to install the CUDA toolkit without the driver.

Problem

I tried to install cuda toolkit without display driver in CentOS 6. It gets installed properly. I was able to compile but it is compiling without performing any operation and I get garbage values in array addition. For cudaGetDeviceCount(&count) I am getting value as "o" which means I don't have any card on my machine.

Original source

Related problems