Linear Layouts: Robust Code Generation of Efficient Tensor Computation Using đť”˝_2
Efficient tensor computation is a cornerstone of modern deep learning (DL) workloads, yet existing approaches struggle to achieve flexible and performant design and implementation of tensor layouts—mappings between logical tensors and hardware resources. The increasing complexity of DL algorithms and hardware demands a generic and systematic approach to handling tensor layouts. In this work, we introduce Linear Layouts, a novel approach that models tensor layouts using linear algebra over 𝔽 2 . By representing tensor layouts as binary matrices acting on the bits of the hardware representation, our approach enables a generic layout definition—as opposed to the classical case-by-case approach—and allows for generic layout-to-layout conversions, eliminating the quadratic explosion that plagues existing solutions. We integrate linear layouts with Triton and demonstrate their effectiveness in optimizing individual Triton operators as well as kernels written in Triton. We also show that li
Linear Layouts: Robust Code Generation of Efficient Tensor Computation Using 𝔽2\mathbb{F}_{2} Conference: Proceedings of the 31st ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1; March 22–26, 2026; Pittsburgh, PA, USAProceedings of the 31st ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1 (ASPLOS ’26), March 22–26, 2026, Pittsburgh, PA, USADOI: 10.1145/3760250.3762221ISBN: 979-8-4007-2165-6/26/03 Keren Zhou Note: The authors contributed equally to this research.…
saved by
related reading
- Mirage Persistent Kernel: A Compiler and Runtime for Mega-Kernelizing Tensor Programsarxiv.org
- Lei.Chat()lei.chat
- How To Scale Your Modeljax-ml.github.io
- Tiny TPUtinytpu.com
- TPU Deep Divehenryhmko.github.io
- All About Rooflines | How To Scale Your Modeljax-ml.github.io
- Triton: An Intermediate Language and Compiler for Tiled Neural Network Computationseecs.harvard.edu
- PyTorch internals : ezyang's blogblog.ezyang.com
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- Transformers Inference Optimization Toolset | AstraBlogastralord.github.io
- Transformer Math 101 | EleutherAI Blogblog.eleuther.ai
- CVPR2023_eff_tutorial_molchanov.pdfnvlabs.github.io