Nvidia CUDA Compiler explained

Developer:Nvidia
Latest Release Version:12.6.0
Language:English
Genre:Compiler
License:Proprietary

Nvidia CUDA Compiler (NVCC) is a compiler by Nvidia intended for use with CUDA. It is proprietary software.

Compiler

CUDA code runs on both the central processing unit (CPU) and graphics processing unit (GPU). NVCC separates these two parts and sends host code (the part of code which will be run on the CPU) to a C compiler like GNU Compiler Collection (GCC) or Intel C++ Compiler (ICC) or Microsoft Visual C++ Compiler, and sends the device code (the part which will run on the GPU) to the GPU. The device code is further compiled by NVCC. NVCC is based on LLVM.[1] According to Nvidia provided documentation, nvcc in version 7.0 supports many language constructs that are defined by the C++11 standard, and a few from C99. In version 9.0, several more constructs from the C++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 or Parallel Thread Execution (PTX) or object code directly. An executable with CUDA code requires: the CUDA core library (cuda) and the CUDA runtime library (cudart).

Other widely used libraries:

See also

References

General

  1. David B. Kirk, and Wen-mei W. Hwu. Programming massively parallel processors: a hands-on approach. Morgan Kaufmann, 2010.
  2. Web site: Nvidia CUDA Compiler Driver NVCC . live . https://web.archive.org/web/20231013194328/https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/ . Oct 13, 2023 . Nvidia Documentation Hub.
  3. Web site: CUDPP . dead . https://web.archive.org/web/20181117222643/http://gpgpu.org/developer/cudpp . Nov 17, 2018 . GPGPU.

Notes and References

  1. Web site: CUDA LLVM Compiler . Nvidia Developer . Apr 6, 2016.
  2. Web site: CUDA C++ Programming Guide . NVIDIA Documentation Hub . en-us. 2019-06-28.