Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

NVCC - CUDA Toolkit Documentation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

NVCC :: CUDA Toolkit Documentation https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.

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.

The GPU code is implemented as a collection of functions


in a language that is essentially C++, but with some
annotations for distinguishing them from the host code,
plus annotations for distinguishing different types of data
memory that exists on the GPU. Such functions may have
parameters, and they can be called using a syntax that is
very similar to regular C function calling, but slightly
extended for being able to specify the matrix of GPU
threads that must execute the called function. During its
life time, the host process may dispatch many parallel GPU
tasks.

For more information on the CUDA programming model,


consult the CUDA C++ Programming Guide.

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

You might also like