NVCC - CUDA Toolkit Documentation
NVCC - CUDA Toolkit Documentation
NVCC - CUDA Toolkit Documentation
html
CUDA Toolkit v10.2.89 NVCC (PDF) - v10.2.89 (older) - Last updated November 28, 2019 - Send Feedback
NVCC
▽ 1. Introduction Changes from Previous Version
▽ 1.1. Overview
1.1.1. CUDA Programming
Major update to the document to reflect recent nvcc
Model changes.
1.1.2. CUDA Sources
1.1.3. Purpose of NVCC ⇒ 1. Introduction
1.2. Supported Host Compilers 1.1. Overview
▷ 2. Compilation Phases 1.1.1. CUDA Programming Model
3. The CUDA Compilation The CUDA Toolkit targets a class of applications whose
Trajectory control part runs as a process on a general purpose
▷ 4. NVCC Command Options computing device, and which use one or more NVIDIA GPUs
as coprocessors for accelerating single program, multiple
▷ 5. GPU Compilation
data (SPMD) parallel jobs. Such jobs are self-contained, in
▷ 6. Using Separate Compilation in the sense that they can be executed and completed by a
CUDA
batch of GPU threads entirely without intervention by the
▷ 7. Miscellaneous NVCC Usage host process, thereby gaining optimal benefit from the
parallel graphics hardware.
1.1.2. CUDA Sources
Source files for CUDA applications consist of a mixture of
conventional C++ host code, plus GPU device functions.
The CUDA compilation trajectory separates the device
functions from the host code, compiles the device
functions using the proprietary NVIDIA compilers and
assembler, compiles the host code using a C++ host
compiler that is available, and afterwards embeds the
compiled GPU functions as fatbinary images in the host
object file. In the linking stage, specific CUDA runtime
libraries are added for supporting remote SPMD procedure
calling and for providing explicit GPU manipulation such as
allocation of GPU memory buffers and host-GPU data
transfer.
1.1.3. Purpose of NVCC
The compilation trajectory involves several splitting,
compilation, preprocessing, and merging steps for each
CUDA source file. It is the purpose of nvcc , the CUDA
compiler driver, to hide the intricate details of CUDA
compilation from developers. It accepts a range of
1 of 1 3/4/2020, 5:13 PM