CUDA 6 toolkit on a virtual Linux machine

We have successfully used a virtual machine for building our applications with nvcc prior to CUDA 6. During the installation of CUDA toolkit, we chose to install driver and toolkit, which worked fine despite the fact that, of course, no NVIDIA GPUs are present on a virtual machine.

When we tried to do the same with CUDA 6, the driver installation failed. The toolkit itself installed correctly, but gave a warning that the installation is not fully functional as the driver is not installed. NVCC seems to be working fine though and produces binaries for devices with CC 1.0 - 5.0. What are the exact consequences of installing toolkit without a driver? What exactly will not be working? Why is a driver required to COMPILE CUDA (not to run it)?

Driver isn’t required to compile… it’s required to run the code as you mention. The warning is made for the average user to understand that they need both the driver installed and the compiler to be able to produce code.

OK, thank you.

If you want to build codes that only rely on the CUDA runtime API, the toolkit is sufficient (driver is not needed). If you want to build codes that use the CUDA driver API, you will need some libs that are normally installed by the driver installer. You can specify additional command-line switches to the driver to get it to load certain parts even with no GPU detected. If you run the driver installer with:

sh --advanced-options

You can cobble together some of the options listed to install just the libraries.