TileLang: Bridge Programmability and Performance in Modern Neural Kernels

Lei Wang, Yu Cheng, Yining Shi, Zhiwen Mo, Zhengju Tang, Wenhao Xie, Tong Wu, Lingxiao Ma, Yuqing Xia, Jilong Xue, Fan Yang, Zhi YangICLR 2026

TL;DR

TileLang is a new "controllable" programming system that bridges the gap between the ease of high-level compilers like Triton and the raw performance of hand-written CUDA. By treating "tiles" of data as first-class citizens and providing explicit primitives for memory and scheduling, it allows developers to write state-of-the-art kernels (like FlashMLA) in under 80 lines of Python while outperforming Triton by an average of 3x on NVIDIA and AMD GPUs.

What Problem Does This Paper Address?

In the world of deep learning, performance is king, and performance usually comes from highly optimized "kernels"—the low-level code that handles operations like Matrix Multiplication or Attention. Currently, developers face a painful choice:

  1. Use a high-level DSL (like Triton): It’s easy to write, but it uses "opaque" optimization passes. You can't easily control exactly how data moves through shared memory or how the hardware pipeline is scheduled, often leaving significant performance on the table.
  2. Write manual CUDA/HIP: You get peak performance, but the code is incredibly complex, thousands of lines long, and nearly impossible to port between different GPU architectures (e.g., from NVIDIA to AMD).
Performance vs. Code Complexity for various frameworks.

As models move toward complex structures like Multi-Head Latent Attention (MLA), the lack of fine-grained control in existing compilers has become a major bottleneck. TileLang addresses this by offering a middle ground: a system that is programmable and concise like Python, but gives the developer explicit "knobs" to turn for hardware-level optimization.

Methods: The Tile-Level Abstraction

TileLang introduces a tile-level abstraction where a "tile" (a rectangular slice of a tensor) is a first-class citizen. The core of the system is the Fused Tile-level dataflow Graph (FTG), which represents the kernel as a series of tile operations.

TileLang code snippet highlighting the Recommend and Inference stages.

Key technical components include:

  • Explicit Primitives: Instead of hoping the compiler optimizes correctly, developers use commands like alloc_shared (for shared memory), copy (for data movement), and Pipelined (to overlap computation and data loading).
  • Two-Stage Automation Workflow:
    • Tile Recommendation: A static, roofline-based cost model analyzes the hardware (e.g., an H100 vs. an MI300X) and suggests the best tile shapes and parallelization strategies.
  • Tile Inference: This engine "fills in the blanks." If a developer specifies a few parts of the dataflow, the inference engine propagates those constraints to automatically determine memory layouts, thread bindings, and bank-conflict-free access patterns.
  • Cross-Platform Backend: It lowers the high-level Python AST into a specialized IR that can then be compiled into optimized CUDA or HIP code via a TVM-based backend.

Evaluation and Key Results

The authors evaluated TileLang across nine representative AI operators, including standard GEMM, Attention variants (MHA, MLA, Block-Sparse Attention), and specialized kernels like 2D Convolution. Benchmarks were run on state-of-the-art AI accelerators: the NVIDIA H100 (Hopper) and the AMD Instinct MI300X.

  • Massive Speedups: TileLang delivered 1.08x–10.58x speedups over Triton on NVIDIA H100 (averaging 3.02x) and 1.01x–11.56x on AMD GPUs (averaging 2.65x).
  • High Efficiency: For the complex MLA kernel, TileLang reached the performance of hand-written CUDA (DeepSeek's implementation) while using less than 16% of the code size.
  • Developer Productivity: It reduced code size by up to 85.5% compared to manual implementations across various kernels.
  • Architectural Adaptability: Ablation studies showed that "Warp Partitioning" was the biggest contributor to performance on NVIDIA hardware, while "Memory Allocation" was the primary driver on AMD, proving the system's ability to adapt to different architectures.

Key Insights

  • Controllability is the "Secret Sauce": Compilers shouldn't be "black boxes." By giving developers explicit control over memory placement and scheduling, they can achieve manual-level performance without the manual-level headache.
  • The Power of the FTG: By modeling the kernel as a graph of tiles rather than a sequence of scalar loops, the compiler can perform global optimizations—like identifying when a tile can be reused across different operations.
  • Hardware-Aware Defaults: You don't have to be an expert to use TileLang. The recommendation engine provides high-quality starting points based on the specific GPU's memory bandwidth and compute capacity.

Limitations and Future Work

  • Static Cost Model: The current recommendation engine uses a static roofline model. While fast, it might not capture complex dynamic behaviors like thermal throttling or specific cache contention issues that a profile-based model might see.
  • Backend Dependency: TileLang currently relies on the TVM backend for final code generation. Any limitations in TVM's low-level code generation could theoretically bottleneck TileLang.
  • Hardware Scope: While it excels on NVIDIA and AMD, the paper does not yet explore other emerging accelerators like TPUs or specialized NPUs, which have very different memory hierarchies.
  • Future Directions: The authors suggest extending TileLang to support even more complex automated tuning and expanding the library of supported "primitives" to cover emerging non-transformer architectures.

Summary updated

BibTeX
@inproceedings{wang2026tilelang,
  author = {Lei Wang and Yu Cheng and Yining Shi and Zhiwen Mo and Zhengju Tang and Wenhao Xie and Tong Wu and Lingxiao Ma and Yuqing Xia and Jilong Xue and Fan Yang and Zhi Yang},
  title = {{TileLang: Bridge Programmability and Performance in Modern Neural Kernels}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Jb1WkNSfUB},
}
Figure