← all repositories
mlc-ai/modern-gpu-programming-for-mlsys

A field manual for programming Blackwell GPUs at the IR level

This book teaches modern GPU kernel programming as a hardware-first progression, using the Blackwell architecture and a Python IR DSL called TIRx to move from concepts to production-grade kernels.

modern-gpu-programming-for-mlsys
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

It is an open online book that teaches GPU kernel programming by treating the Blackwell-class GPU as the central subject. The material progresses from hardware fundamentals—execution models, memory hierarchy, and asynchronous engines—through a Python DSL called TIRx, and culminates in production-grade kernels for GEMM and Flash Attention 4.

The interesting bit

Instead of stopping at abstract API calls, the text builds a tiled GEMM step-by-step into a state-of-the-art implementation using TMA pipelining, persistent scheduling, and warp specialization, then reuses those primitives to assemble a complete Flash Attention 4 kernel. TIRx itself is an unusual vehicle: it parses Python source via inspection to generate GPU IR through Apache TVM, letting you write low-level kernels in a high-level syntax.

Key highlights

  • Deep dive into Blackwell specifics: Tensor Memory, TMA, Tensor Cores, warpgroups, clusters, and Cluster Launch Control scheduling.
  • Complete walkthrough from roofline analysis and data layout to a multi-CTA clustered GEMM.
  • Full Flash Attention 4 coverage including two MMAs with softmax, online-softmax rescaling, causal masking, and GQA.
  • TIRx language reference and compiler internals included for readers who want to extend the toolchain.
  • Published in English and Chinese as a Sphinx site with auto-deployment.

Caveats

  • Every runnable kernel targets sm_100a; you need a Blackwell GPU such as a B200 to execute the examples, though reading costs nothing.
  • TIRx parses kernel source via Python source inspection, so kernels must live in files or notebook cells and cannot be passed as inline strings.
  • The full reference GEMM and Flash Attention 4 kernels live in a separate companion package not included in the main book.

Verdict

Read this if you are a systems or compiler engineer who wants to understand Blackwell silicon deeply enough to write kernels that match or beat vendor libraries. Look elsewhere if you need a generic GPU introduction or lack access to the specific hardware required to test your code.

Frequently asked

What is mlc-ai/modern-gpu-programming-for-mlsys?
This book teaches modern GPU kernel programming as a hardware-first progression, using the Blackwell architecture and a Python IR DSL called TIRx to move from concepts to production-grade kernels.
Is modern-gpu-programming-for-mlsys open source?
Yes — mlc-ai/modern-gpu-programming-for-mlsys is an open-source project tracked on heatdrop.
What language is modern-gpu-programming-for-mlsys written in?
mlc-ai/modern-gpu-programming-for-mlsys is primarily written in HTML.
How popular is modern-gpu-programming-for-mlsys?
mlc-ai/modern-gpu-programming-for-mlsys has 1k stars on GitHub.
Where can I find modern-gpu-programming-for-mlsys?
mlc-ai/modern-gpu-programming-for-mlsys is on GitHub at https://github.com/mlc-ai/modern-gpu-programming-for-mlsys.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.