Episode 31 · Engineering Deep Dives

Compilers and MLIR: From LLVM to the Triton and XLA Kernels That Make GPUs Fast

Episode 31: Compilers and MLIR: From LLVM to the Triton and XLA Kernels That Make GPUs Fast, by Sankalp Thakur

A slow neural-network layer becomes a question about what a compiler can see. Begin with the compiler pipeline and LLVM, then explore why machine-learning workloads need additional representations and transformations. XLA, MLIR and kernel-generation ideas connect graph-level structure to memory movement and hardware execution. Portability and verification raise the next questions: how much optimization can be shared across accelerators, and how do we know a transformed program remains correct?

Listen to the show on your preferred podcast platform.

See it work

Explore the working principle

Inside this episode

  1. Cold open: the slow layer
  2. What a compiler actually does
  3. LLVM: the universal middle
  4. The problem LLVM could not solve
  5. The memory wall in one layer
  6. XLA: compiling the whole graph
  7. MLIR: a compiler that speaks many languages
  8. Triton: GPU programming for the rest of us
  9. Ines writes her kernel
  10. torch.compile: the compiler writes Triton for you
  11. Ahead of time, just in time, and the launch tax
  12. Compiling for inference
  13. Tiling: the art of fitting things on the counter
  14. FlashAttention: when the compiler is a person
  15. Down in the back end: registers and schedules
  16. Autotuning: let the machine try
  17. Many chips, one model
  18. Beyond NVIDIA: the portability question
  19. Can we trust the compiler?
  20. The frontier
  21. Epilogue: eleven lines, one kernel
← Explore all 96 episodes

Production credits & AI disclosure

Scripts generated with Claude Opus. Synthetic narration generated with Edge TTS. Reviewed, listened to, and approved by Sankalp Thakur.