AnyLearn
All lessons

cuda

6 lessons tagged cuda: free, quiz-checked micro-lessons.

Programming
intermediate

Profiling CUDA: Occupancy, Memory Coalescing, and Nsight

A working CUDA kernel is the start, not the finish. How to measure occupancy, spot uncoalesced loads and warp divergence, and read the three numbers in Nsight Compute that actually matter.

9 steps·~14 min
Programming
intermediate

Shared Memory Tiling for Matrix Multiplication

Why naive matmul on a GPU is bandwidth-starved, and how tiling with __shared__ memory reduces global memory traffic by a factor of the tile size. The classic optimisation, with the kernel that demonstrates it.

9 steps·~14 min
Programming
intermediate

Your First CUDA Kernel: Vector Addition End-to-End

The hello-world of CUDA, done properly. Allocate device memory, copy inputs, launch a kernel, copy results back, free, and check every return code. The full driver + kernel in one runnable file.

9 steps·~14 min
Programming
intermediate

CUDA Memory Hierarchy: Global, Shared, Constant, Local, Registers

The five memory spaces a CUDA kernel can see and why they have wildly different speeds. Global vs shared vs constant vs local vs registers, coalesced access, bank conflicts, and a cheat-sheet table you'll actually reference.

9 steps·~14 min
Programming
intermediate

CUDA Programming Model: Kernels, Threads, Blocks, and Grids

How CUDA carves a problem into a grid of blocks of threads. Host vs device code, the __global__ qualifier, the launch syntax, and how every thread figures out which slice of data it owns.

9 steps·~14 min
Programming
intermediate

Parallel Computing Fundamentals: CPUs, GPUs, Latency vs Throughput

Why GPUs eat CPUs for breakfast on some workloads and choke on others. Serial vs parallel execution, Amdahl's law, the latency-vs-throughput trade-off baked into silicon, and a rule of thumb for when to reach for a GPU.

9 steps·~14 min

Related topics