Use NVCC with other compilers

I have been wondering whether you can (or it is possible to implement) change the default compiler from GCC to e.g. the Intel C++ Compiler. I am aware that you can at least create a directory with a “fake GCC”, and make NVCC to use it. But are there cleaner ways, like with a option flag?

Currently, the only tested & supported compiler on Linux is gcc. We are currently evaluating other compilers.

I’ve had some success mixing CUDA with the Intel C/C++ compilers. I’ve found that the Intel compiler flags used can have a strong effect on the compatibility between the NV runtime libs and the Intel runtimes, but other than that it seems to work quite well. I’m still having NVCC call GNU gcc for the
CUDA kernels etc, but I can link it up with the Intel compiler and mix codes that use SSE-optimized
CPU-based code from the Intel compilers with CUDA kernels, so one binary can “do it all”.

John Stone

What are the flags to modify in order to be able to use the Intel compiler on Linux?