liveBook · Manning

CUDA kernel

A CUDA kernel is a function launched on a GPU for execution by multiple threads in parallel.

How 2 Manning books explain it

CUDA for LLMs

A kernel is a function launched for parallel execution by many GPU threads.

How it is used
Introduces kernels as the GPU execution mechanism for parallelizing deep-learning operations and extending framework workloads.
How deep it goes
Develops launch syntax, indexing, bounds checks, memory management, and naive implementations before motivating fusion and optimization.
Examples
Works through vector addition, two-dimensional matrix addition, neural-network passes, and naive attention.
What you can do after
Builds kernels from scratch, launches them with appropriate indexing and bounds checks, and verifies their results.

Read how CUDA for LLMs explains CUDA kernel →

Grokking GPU Programming

A CUDA kernel is a function launched on a GPU to execute concurrently across many GPU threads.

How it is used
Uses kernels to express GPU work as the same instructions executed concurrently by many threads.
How deep it goes
Explains launches, indexing, synchronization, and bounds checks, then walks through tiled kernel layout and its correctness requirements.
Examples
Uses an eight-thread greeting and a tiled matrix multiplication kernel with one thread per tile element.
What you can do after
Build a CUDA kernel from scratch and launch it with threads assigned to work.

Read how Grokking GPU Programming explains CUDA kernel →

What to know first

Related concepts

Questions about CUDA kernel

What is CUDA kernel?

A CUDA kernel is a function launched on a GPU for execution by multiple threads in parallel.

Which Manning books explain CUDA kernel?

CUDA for LLMs and Grokking GPU Programming.

What should I know before learning CUDA kernel?

Manning books that teach CUDA kernel usually introduce C++, CPU, CUDA and inner product first.

What kinds of CUDA kernel are there?

Kinds of CUDA kernel include generated kernel.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.