I'll try to answer, but feel free to ask for clarification if I don't illuminate the topic.

nvcc is really just a coordinator for many calls.  nvcc makes a series of calls, producing intermediate code (PTX files), that can then be just-in-time compiled into final (.cubin) architecture specific code by the nvida libraries.  In a sense, yes, it compiles source code, but then breaks out kernel code to be targeted to the GPU device architecture(s).  Later in the compilation sequence they all get merged into one file.

I attach an example of a C++ file that includes at the top in the comments the 15 commands issued by the nvcc nVidia compiler coordinator.  The final (15th command) is the link stage, producing a final executable that depends upon several shared libraries.  The matrixMul.cu example from the SDK is consolidated into one file, matrixMul.cu.txt, and the commands used to assemble the final binary broken out at the top of the file.

Thanks again.

Best regards,
Jason


-- 
Jason E. Aten, Ph.D.


> Perhaps I don't understand how nvcc and CUDA work.  Is it the case that all source code is compiled by nvcc and then linked to create an executable, or is there some other preprocessor/compiler/linker/loader that is involved?
>
> Marc
>
>