What happens when a GPU reads memory | Doubleword
blog.doubleword.ai · 5,138 words · saved by 1 readers
Following an LDG.E SASS instruction through the hardware units in an RTX 4090.
Our previous post followed a vector-add kernel — c[i] = a[i] + b[i], one thread per float — from nvcc down to the warps. We went into a lot of detail on how the kernel was launched, but we also left a lot out. This time, we’re going to address our omissions, and follow the path the critical SASS instruction (a global load) takes through the hardware — in this case, since it’s under my desk, an RTX 4090We do this kind of reverse engineering for performance reasons, at least in principle (for a great rationale, see 'Why these details matter' in the Citadel microbenchmarking paper). For the…
saved by
related reading
- Modern GPU Programming For MLSys — Modern GPU Programming For MLSysmlc.ai
- GitHub - xoreaxeaxeax/asm-hall-of-shame: Racing to the bottom of CPU performancegithub.com
- What happens when you run a CUDA kernelfergusfinn.com
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- GitHub - adam-maj/tiny-gpu: A minimal GPU design in Verilog to learn how GPUs work from the ground up · GitHubgithub.com
- Dissecting the NVIDIA Volta GPU Architecture via Microbenchmarkingarxiv.org
- How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance: a Worklogsiboehm.com
- Worklog: Optimising GEMM on NVIDIA H100 for cuBLAS-like Performance (WIP) – Hamza's Bloghamzaelshafie.bearblog.dev
- CUDA C++ Programming Guide (Legacy) — CUDA C++ Programming Guidedocs.nvidia.com
- BrrrVizbrrrviz.com
- Reverse-Engineering cuBLASaccu.org
- How to Think About GPUs | How To Scale Your Modeljax-ml.github.io