Can I install CUDA without drivers in Linux CentOS

2020-02-15 01:46发布

问题:

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.

回答1:

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.



回答2:

If you want just run the codes and profiling the performance and other parameters, it would be helpful if you install GPGPU-sim simulator. It doesn't need any graphic card on your machine.



标签: c++ linux cuda