<<<CUDA C++ Coursegrid · block · warp · lane
The first stop for general-purpose GPU programming

Take CUDA C++ from syntax to hardware intuition

__global__ and threadIdx take half an hour. The real bar is looking at a kernel and knowing where it is stuck. This course goes write-it-correct, then write-it-fast, then read the compiler output, then ship it. Every optimization names the bottleneck it removes.

You can finish the whole course without a GPU: the four labs simulate the execution model in the browser.

vector_add.cu
__global__ void add(const float* a, const float* b, float* c, int n) {    int i = blockIdx.x * blockDim.x + threadIdx.x;    if (i < n) c[i] = a[i] + b[i];} add<<<(n + 255) / 256, 256>>>(d_a, d_b, d_c, n);
15
Lessons
Five stages, in order
6h
Reading time
Including code and quizzes
4
Interactive labs
GPU model in the browser
9
Compilable samples
cuda/ directory, nvcc

Learning path

Take them in order. Each stage builds on the last.
1

Getting started

Write, compile, and run your first kernel3 lessons · 60 min
2

Execution model and memory

Warps, the memory hierarchy, coalescing, shared memory: where performance comes from4 lessons · 92 min
3

Optimization in practice

Seven-step reduction, occupancy tradeoffs, pipeline overlap3 lessons · 76 min
4

Going lower

Warp primitives, PTX and SASS: see what the compiler emitted2 lessons · 46 min
5

Production and AI

Profiling methodology, PyTorch ops, Tensor Cores and Triton3 lessons · 66 min

Interactive labs

Turn abstractions into something you can drag
The repo also has compilable source

Every important kernel in the lessons has a full runnable copy under cuda/, with timing, result checks, and multi-version performance comparisons. On a machine with a GPU, make builds all of them. Without a GPU you can still finish the course.

On a machine with a GPU
cd cudamake            # compile every sample for the detected architecturemake run        # run them in order./bin/06_reduction   # seven reduction versions, timed