FrameworksMLModels

TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels

by Tile Lang Contributors (tile-ai)

AdvancedDocumentationFreeSelf-paced reference documentation: 3 tutorials, 8 programming guides and 5 worked operator examples

Write and tune GEMM and attention kernels in Python, then compile them for CUDA, ROCm, Metal or Ascend.

Start LearningAdded Nov 19, 2026 · Updated Nov 19, 2026

Overview

TileLang (tile-lang) is an open-source domain-specific language for writing high-performance GPU and CPU kernels in Python-style syntax, built on the TVM compiler infrastructure. Its documentation (version 0.1.15 when checked on November 19, 2026) is organized into Get Started, Tutorials, Tools, Programming Guides, Deep Learning Operators, Compiler Internals, a Developer Guide and an auto-generated API reference. Get Started covers installation by pip, source build, Docker or nightly wheels, a short introduction to the tile-based model, and how compilation targets are chosen. In that model tiles are first-class objects: T.Kernel sets the thread-block context, T.alloc_shared places data in on-chip shared memory, T.alloc_fragment holds register-level accumulators whose layout a Layout Inference Pass works out, and T.copy, T.clear, T.fill and T.Parallel move and initialize data. The docs describe three programming levels that can be mixed in one kernel: a hardware-unaware beginner level that is not yet fully implemented, a developer level built on the Tile Library, and an expert level with direct thread primitives. Worked operator examples cover element-wise ops, GEMV, GEMM, sparse GEMM and a FlashMLA kernel for Hopper, and the Tools section documents a performance analyzer, layout visualization, IR lower tracing and pass diffing. Backends in the API reference include NVIDIA CUDA, AMD ROCm, Apple Metal, Huawei Ascend, CPU and WebGPU. The project lives at tile-ai/tilelang on GitHub, credits the TVM community, Peking University and Microsoft Research, and ships DeepSeek V3.2, V4, MLA and mHC kernel implementations as examples.

At a Glance

Topic
Frameworks
Level
Advanced
Format
Documentation
Cost
Free
Duration
Self-paced reference documentation: 3 tutorials, 8 programming guides and 5 worked operator examples
Provider
Tile Lang Contributors (tile-ai)
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • ✓Install TileLang from pip, source, Docker or nightly wheels and choose the right compilation target for your GPU
  • ✓Write tile-based kernels with T.Kernel, T.alloc_shared, T.alloc_fragment, T.copy and T.Parallel
  • ✓Build GEMV, GEMM and sparse GEMM operators on top of the hardware-optimized Tile Library
  • ✓Implement a FlashMLA attention kernel on NVIDIA Hopper GPUs by following the worked example
  • ✓Debug TileLang programs and trace how IR passes lower a kernel to CUDA or HIP source
  • ✓Auto-tune kernel configurations and profile them with the built-in performance analyzer
  • ✓Use software pipeline annotations, control flow and the type system described in the programming guides

Highlights

  • •Backends listed in the docs span NVIDIA CUDA (including tcgen05 paths for Blackwell), AMD ROCm, Apple Metal, Huawei Ascend, CPU and WebGPU
  • •About 9.0k GitHub stars, 1.0k forks and 2,207 commits as of November 19, 2026; repo news adds Ascend 950 support (2026-09-30) and an open-sourced LSP (2026-08-04)
  • •The repository includes DeepSeek V3.2, V4, MLA and mHC kernels, and its 2026-07-21 news item reports about 1.9x higher performance for a DeepSeek V3.2 top-k optimization
  • •Tooling pages for layout visualization, IR lower tracing and pass diffs let you inspect what the compiler did to your kernel
  • •Community coverage is thin (the top Hacker News story had 6 points as of November 19, 2026), so expect to learn from the docs and repo issues rather than third-party tutorials

Who It’s For

Best For

  • ✓ML systems engineers writing custom attention or GEMM kernels
  • ✓Inference engineers porting kernels across NVIDIA, AMD and Apple hardware
  • ✓Researchers implementing new attention variants such as MLA or sparse attention
  • ✓Triton users evaluating a TVM-based alternative

Prerequisites

  • •Solid Python and PyTorch
  • •Working knowledge of the GPU memory hierarchy (global memory, shared memory, registers) and thread blocks
  • •Access to a supported GPU; NVIDIA CUDA is the primary target, while ROCm, Metal and Ascend need extra setup

FAQ

What is TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels?

TileLang's official documentation teaches you to write high-performance GPU and CPU kernels in a Python-style DSL built on the TVM compiler. It is for ML systems and inference engineers who already know PyTorch and GPU memory basics. Afterwards you can write, tune and profile GEMM, sparse GEMM and FlashMLA-style attention kernels across NVIDIA, AMD and Apple hardware.

Is TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels free?

TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels is free to access.

What level is TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels for?

TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels is aimed at a advanced audience. Recommended background: Solid Python and PyTorch, Working knowledge of the GPU memory hierarchy (global memory, shared memory, registers) and thread blocks, Access to a supported GPU; NVIDIA CUDA is the primary target, while ROCm, Metal and Ascend need extra setup.

How long does TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels take?

Expect roughly Self-paced reference documentation: 3 tutorials, 8 programming guides and 5 worked operator examples. Most learners work through it at their own pace.

What will I learn from TileLang Documentation: Python DSL for High-Performance GPU and CPU Kernels?

You'll learn: Install TileLang from pip, source, Docker or nightly wheels and choose the right compilation target for your GPU; Write tile-based kernels with T.Kernel, T.alloc_shared, T.alloc_fragment, T.copy and T.Parallel; Build GEMV, GEMM and sparse GEMM operators on top of the hardware-optimized Tile Library; Implement a FlashMLA attention kernel on NVIDIA Hopper GPUs by following the worked example; Debug TileLang programs and trace how IR passes lower a kernel to CUDA or HIP source; Auto-tune kernel configurations and profile them with the built-in performance analyzer; Use software pipeline annotations, control flow and the type system described in the programming guides.

Topics

tilelanggpu-kernelskernel-dslflashattentioncudatvm

Sources

This page was written from 3 sources, 2 on domains other than tilelang.com.

  1. 1.tilelang.com — tilelang.comvendor
  2. 2.github.com — tilelang
  3. 3.hn.algolia.com — hn.algolia.com