liveBook · Manning

Nvcc

As explained in Grokking GPU Programming

nvcc is NVIDIA's CUDA compiler driver for compiling CUDA source files into executable programs.

nvcc is the CUDA compiler that turns `.cu` source files into programs. It understands CUDA-specific syntax, including kernel launches, and translates that syntax into calls the CUDA runtime can use. section 2.1 section 2.4

For example, `helloKernel<<<1, 8>>>();` launches a kernel with one block of eight threads. nvcc translates the launch into a `cudaLaunchKernel` call; a kernel cannot be launched as an ordinary function with `helloKernel();`. section 2.4

How Grokking GPU Programming covers it

How deep it goes
Explains launch translation and rejection of an ordinary kernel call, without detailing compiler internals.
Examples
Uses a helloKernel launch with one block and eight threads to illustrate CUDA launch syntax.
What you can do after
Understand how CUDA launch syntax is translated and why kernels cannot be called like ordinary functions.
How it connects
Connects CUDA kernels and kernel launch syntax to the CUDA runtime function cudaLaunchKernel.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking GPU Programming. The section links point to the parts of the book it draws on.