tile-ai/tilelang-puzzles

Learning TileLang with 10 puzzles!

Python

383

13 commits

updated Aug 11, 2026

See the code

README

<img src=./images/logo-row.svg />

TileLang Puzzles

TileLang Puzzles is a set of puzzles to help you learn TileLang, a domain-specific language for developing high-performance deep learning kernels. We will start from some trivial examples and smoothly progress to modern kernels such as GEMM and FlashAttention, aiming to provide a comprehensive understanding of the design principles of TileLang.

Getting Started

Environment Configuration

The only thing you need to install is TileLang and its dependency. To check your installation, run:

python -c "import tilelang; print(tilelang.__version__);"

You can also run our environment check script to confirm that TileLang and your GPU are configured correctly:

python3 scripts/check_tilelang_env.py

Run Puzzles

We provide 10 puzzles in the puzzles/ directory, each as a standalone executable script. Reference implementations are available in ans/ for comparison. To run a puzzle, use:

python3 puzzles/01-copy.py
python3 ans/01-copy.py

Acknowledgements

This is project is inspired by the following projects: Triton Puzzles & Triton Puzzles Lite, LeetGPU.

Significant stargazers

Xingkai Yu

1,506 followers · starred Feb 2026

OrangeX4

855 followers · starred Feb 2026

Masahiro Hiramori

166 followers · starred Apr 2026

haosdent

662 followers · starred May 2026

tile-ai/tilelang-puzzles

Learning TileLang with 10 puzzles!

Python

383

13 commits

updated Aug 11, 2026

See the code

README

<img src=./images/logo-row.svg />

TileLang Puzzles

TileLang Puzzles is a set of puzzles to help you learn TileLang, a domain-specific language for developing high-performance deep learning kernels. We will start from some trivial examples and smoothly progress to modern kernels such as GEMM and FlashAttention, aiming to provide a comprehensive understanding of the design principles of TileLang.

Getting Started

Environment Configuration

The only thing you need to install is TileLang and its dependency. To check your installation, run:

python -c "import tilelang; print(tilelang.__version__);"

You can also run our environment check script to confirm that TileLang and your GPU are configured correctly:

python3 scripts/check_tilelang_env.py

Run Puzzles

We provide 10 puzzles in the puzzles/ directory, each as a standalone executable script. Reference implementations are available in ans/ for comparison. To run a puzzle, use:

python3 puzzles/01-copy.py
python3 ans/01-copy.py

Acknowledgements

This is project is inspired by the following projects: Triton Puzzles & Triton Puzzles Lite, LeetGPU.

Significant stargazers

Xingkai Yu

1,506 followers · starred Feb 2026

OrangeX4

855 followers · starred Feb 2026

Masahiro Hiramori

166 followers · starred Apr 2026

haosdent

662 followers · starred May 2026

Languages

Python

100.0%