✳flâneur — a map of the web's best reading
What happens when you run a CUDA kernel
fergusfinn.com · 7,082 words · saved by 1 readers
Tracing one vector-add kernel from nvcc all the way down to the warps that execute it.
What happens when you run a CUDA kernel 29 Jun 2026 · 35 min read · Cover: Salomon de Caus's pinned-cylinder water organ, engraving from Les Raisons des Forces Mouvantes (1615). Here’s a simple CUDA program. It adds two vectors. __global__ void vadd ( 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]; } int main () { int n = 1 << 20 ; // a million floats (1,048,576) size_t bytes = n * sizeof ( float ); float * a = ( float* ) malloc (bytes), * b = ( float* ) malloc (bytes), * c = ( float* ) malloc (bytes); for ( int i
Explore this link on the map →related reading
- CUDA C++ Programming Guide (Legacy) — CUDA C++ Programming Guidedocs.nvidia.com
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance: a Worklogsiboehm.com
- Execution Model - SLING user documentationdoc.sling.si
- An Even Easier Introduction to CUDA (Updated) | NVIDIA Technical Blogdeveloper.nvidia.com
- Gentle introduction to GPUs inner workings | vkSegfaultvksegfault.github.io
- GitHub - adam-maj/tiny-gpu: A minimal GPU design in Verilog to learn how GPUs work from the ground up · GitHubgithub.com
- CUDA - Wikipediaen.wikipedia.org
- Worklog: Optimising GEMM on NVIDIA H100 for cuBLAS-like Performance (WIP) – Hamza's Bloghamzaelshafie.bearblog.dev
- AMD GPUs go brrr · Hazy Researchhazyresearch.stanford.edu
- GPUs Go Brrr · Hazy Researchhazyresearch.stanford.edu
- How to Think About GPUs | How To Scale Your Modeljax-ml.github.io