Pidoku
25Advanced Kernel Engineering
On this page

Advanced Kernel Engineering

Module 2512 lessons~16h 55m

Lessons, in order

25.a Anatomy of a Modern Kernel: TMA, mbarriers, WGMMA, tcgen05 and TMEMA state-of-the-art GEMM or attention kernel on Hopper or Blackwell is no longer "threads load data, then threads multiply". It is a small dataflow machine built from four kinds of hardware … 1h 30m 25.b Warp Specialization and Software PipeliningTwo techniques, used together in every fast Hopper and Blackwell kernel: 1h 20m 25.c CUTLASS and CuTe: Layouts as AlgebraCUTLASS is the reference implementation of fast linear algebra on NVIDIA GPUs. Since CUTLASS 3 (2023), everything in it is built on CuTe, whose one big idea is: 1h 30m 25.d The New Kernel Languages: CuTe DSL, Triton/Gluon, TileLang, ThunderKittensBetween "write CUDA C++ by hand" and "call cuBLAS" there are now half a dozen serious languages for writing fast kernels. They differ mainly in how much of the hardware machine of 25.a–25.b … 1h 15m 25.e A Fast GEMM, Step by Step, on Hopper and BlackwellThis lesson follows one GEMM — BF16, C = A × B, M = N = K = 8192 — from a correct but slow kernel to one that matches cuBLAS, adding one idea at a time. Each step names the problem it … 1h 40m 25.f Attention Kernels: FlashAttention-3/4, Decode Attention, FlashInfer, FlashMLALesson 13.l explained what FlashAttention computes and how it evolved. This lesson is about how the kernels are built on Hopper and Blackwell, and about the separate family of decode kernels … 1h 35m 25.g Low-Precision Kernels: Block-Scaled FP8/FP4 and Mixed-Input GEMMsQuantisation (13.b–13.h) decides which format a model uses. This lesson is about the kernels that make those formats fast. There are two families: 1h 25m 25.h MoE Kernels: Grouped GEMM, Permutation, DeepGEMMAn MoE layer (14.g) turns into a short pipeline of kernels on each GPU (14.h listed them): 1h 25m 25.i Communication Kernels: Fused All-Reduce, DeepEP, NVSHMEM, OverlapLessons 9.f and 9.g covered what collectives cost and how NCCL picks algorithms. This lesson is about the kernels that serving engines write themselves when NCCL's general-purpose … 1h 25m 25.j Persistent Kernels and MegakernelsThe ordinary CUDA model is "launch a grid with one CTA per tile; the hardware schedules CTAs onto SMs; the kernel ends when all are done". Two departures from it now matter for inference: 1h 15m 25.k Beyond NVIDIA: HIP, Composable Kernel/AITER, TPU PallasEverything in 25.a–25.j has a counterpart on other accelerators, with different names and different amounts of hardware help. This lesson maps the ideas onto the two non-NVIDIA platforms … 1h 15m 25.l Testing, Verifying and Autotuning KernelsThe engineering discipline that turns a fast kernel into one you can ship: 1h 20m

About this module

How state-of-the-art inference kernels are built on Hopper, Blackwell and beyond: the asynchronous machinery of a modern kernel (TMA, mbarriers, WGMMA, tcgen05 and tensor memory), warp specialisation and pipelining, CUTLASS and CuTe layouts, the new kernel languages, a fast GEMM step by step, attention, low-precision, MoE and communication kernels, persistent kernels and megakernels, AMD and TPU kernels, and how to test and autotune all of them. It builds on Modules 4–6 and assumes you have read FlashAttention (13.l) and the MoE lessons (14.e, 14.g, 14.h).

Lessons#

#LessonTime
25.aAnatomy of a Modern Kernel: TMA, mbarriers, WGMMA, tcgen05 and TMEM90 min
25.bWarp Specialization and Software Pipelining80 min
25.cCUTLASS and CuTe: Layouts as Algebra90 min
25.dThe New Kernel Languages: CuTe DSL, Triton/Gluon, TileLang, ThunderKittens75 min
25.eA Fast GEMM, Step by Step, on Hopper and Blackwell100 min
25.fAttention Kernels: FlashAttention-3/4, Decode Attention, FlashInfer, FlashMLA95 min
25.gLow-Precision Kernels: Block-Scaled FP8/FP4 and Mixed-Input GEMMs85 min
25.hMoE Kernels: Grouped GEMM, Permutation, DeepGEMM85 min
25.iCommunication Kernels: Fused All-Reduce, DeepEP, NVSHMEM, Overlap85 min
25.jPersistent Kernels and Megakernels75 min
25.kBeyond NVIDIA: HIP, Composable Kernel/AITER, TPU Pallas75 min
25.lTesting, Verifying and Autotuning Kernels80 min

Previous: Research and Frontier · Next: Beyond Text

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in