Search code examples
gcccompilationcudanvccincremental-build

Incremental compilation in nvcc (CUDA)


I have many structs (classes) and standalone functions that I like to compile separately and then link to the CUDA kernel, but I am getting the External calls are not supported error while compiling (not linking) the kernel. nvcc forces to always use inline functions from the kernel. This is very frustrating!! If somebody have figured out a way to achieve incremental compilation, please share.

Also see the following thread on NVIDIA forums. http://forums.nvidia.com/index.php?s=&showtopic=103256&view=findpost&p=1009242


Solution

  • Currently you cannot call device functions from the GPU in CUDA, which is why they are inlined.

    Fermi hardware supports device functions without inlining.