| Nvidia CUDA Compiler | |
|---|---|
| Developer | Nvidia |
| Initial release | June 2007; 18 years ago (2007-06) |
| Stable release | 12.6.0 / August 2024; 1 year ago (2024-08) |
| Available in | English |
| Type | Compiler |
| License | Proprietary |
| Website | docs |
Nvidia CUDA Compiler (NVCC) is acompiler byNvidia intended for use withCUDA. It isproprietary software.
CUDA code runs on both thecentral processing unit (CPU) andgraphics processing unit (GPU). NVCC separates these two parts and sends host code (the part of code which will be run on theCPU) to aC compiler likeGNU Compiler Collection (GCC) orIntel C++ Compiler (ICC) orMicrosoft Visual C++ Compiler (MVCC), and sends device code called "kernels" (the part which will run on the GPU) to the GPU. The device code is further compiled by NVCC. NVCC is based onLLVM.[1] According to Nvidia provided documentation, nvcc in version 7.0 supports many language constructs that are defined by theC++11 standard, and a few fromC99. In version 9.0, several more constructs from theC++14 standard are added.[2]
Any source file containing CUDA language extensions (.cu) must be compiled with nvcc. NVCC is a compiler driver which works by invoking all the necessary tools and compilers like cudacc, g++, cl, etc. NVCC can output either C code (CPU Code) that must then be compiled with the rest of the application using another tool orParallel Thread Execution (PTX) or object code directly. An executable with CUDA code requires: the CUDA corelibrary (cuda) and the CUDA runtime library (cudart).
Other widely used libraries: