Suppose, hypothetically, that I want to test compile, but not run, CUDA code on a machine that has no CUDA capable GPU present. Should I be able to do that with only the CUDA Toolkit installed? Or does NVCC rely on the presence of graphics card hardware in any way?
Asked
Active
Viewed 601 times
-1
-
2http://stackoverflow.com/questions/8703416/is-cuda-hardware-needed-at-compile-time – ovenror Jan 15 '14 at 18:55
-
yes you can. actually you can even run the code using the cuda emulator provided by Nvidia – gaurav5430 Jan 15 '14 at 18:56
-
3NVIDIA doesn't provide a CUDA emulator, at least not with any recent CUDA packages in the last few years. – Robert Crovella Jan 15 '14 at 19:00
1 Answers
3
Certainly on linux, you can install the CUDA toolkit and compile code without a GPU installed. There are nuances to this. For example, if your code depends on a library that only gets installed by the driver (such as libraries required by CUDA code using the Driver API), then there are additional bridges to cross. But ordinary CUDA runtime API code can be compiled this way just fine. nvcc
does not depend on a GPU.
I haven't actually tried this in Windows, but I think it should be possible to install the CUDA toolkit without a CUDA GPU.

Robert Crovella
- 143,785
- 11
- 213
- 257
-
3On the last point, you can install the toolkit on Windows platforms without supported GPU hardware and compile and link applications. – talonmies Jan 15 '14 at 19:40