Works on My GPU

GPU & Systems

GPU architecture, CUDA, and low-level performance optimization.

Deep DiveInference

PagedAttention: How vLLM Stopped Wasting GPU Memory

Existing LLM serving systems were wasting 60–80% of KV cache memory before a single token got generated. PagedAttention borrows a 60-year-old idea from operating systems — virtual memory paging — to bring that down to under 4%.

Read more →·Beyzanur Zeybek
Deep DiveCUDA

Why FP8 Needs Register Shuffles in WGMMA

FP16 lets you feed one WGMMA's output straight into the next — the layouts already match. FP8 doesn't get that for free: the accumulator and the next operand disagree on which thread owns which value, and fixing that costs real shuffle instructions.

Read more →·Beyzanur Zeybek
FoundationsCUDA

WGMMA and Register Fragments, Explained

WGMMA showed up unexplained in two earlier posts — as a row in a diagram, then as a building block of FlashAttention-3. Here's what it actually is: an async, 128-thread-wide matrix multiply, and the register layout that makes it usable.

Read more →·Beyzanur Zeybek
FoundationsCUDA

Understanding CuTe Layouts: Shape and Stride

Every CuTe layout is just a pair — a Shape and a Stride. That one idea, applied recursively, is what lets CUTLASS 3.x describe a whole GEMM's tiling — from the full matrix down to a single thread's registers — with one abstraction instead of a class per level.

Read more →·Beyzanur Zeybek
FoundationsCUDA

What Is CUTLASS, and Why Does It Exist?

cuBLAS gives you a fast, opaque matrix multiply. CUTLASS gives you the same speed as composable C++ building blocks, so you can fuse, customize, and specialize — matched to the GPU's own execution and memory hierarchy.

Read more →·Beyzanur Zeybek