tile-ai/tilelang-puzzles
Learning TileLang with 10 puzzles!
What it solves
Writing high-performance deep learning kernels is hard. TileLang is a domain-specific language that helps, but learning it from scratch is steep. These puzzles give you a guided path: you start with trivial examples and gradually build up to modern kernels like GEMM (matrix multiplication) and FlashAttention, so you understand the design principles of TileLang by doing.
How it works
You install TileLang and its dependencies, then run a script to check your setup is correct. The project ships 10 puzzles, each a standalone Python script in the puzzles/ directory. Each puzzle asks you to implement a kernel; reference solutions are provided in the ans/ directory so you can compare your work. You just run the puzzle script and the answer script side by side.
Who it’s for
Programmers who know the basics of deep learning and want to write fast GPU kernels, particularly those wanting to learn TileLang specifically. It’s also useful for anyone who likes learning by solving incremental challenges.
Highlights
- 10 progressive puzzles, from simple copy operations to GEMM and FlashAttention
- Reference implementations included for every puzzle
- Inspired by Triton Puzzles, Triton Puzzles Lite, and LeetGPU
- Includes an environment-check script to verify your TileLang and GPU setup
Related
- Project
- Project
- Project
- Project