Lune

ASPLOS2023Top-tier venue

TensorIR: An Abstraction for Automatic Tensorized Program Optimization

Siyuan Feng, Bohan Hou, Hongyi Jin, Wuwei Lin, Junru Shao, Ruihang Lai, Zihao Ye, Lianmin Zheng, Cody Hao Yu, Yong Yu, Tianqi Chen

Abstract

Deploying deep learning models on various devices has become an important topic. The wave of hardware specialization brings a diverse set of acceleration primitives for multi-dimensional ten- sor computations. These new acceleration primitives, along with the emerging machine learning models, bring tremendous engineering challenges. In this paper, we present TensorIR, a compiler abstraction for optimizing programs with these tensor computation primitives. TensorIR generalizes the loop nest representation used in existing machine learning compilers to bring tensor computation as the first-class citizen. Finally, we build an end-to-end framework on top of our abstraction to automatically optimize deep learning models for given tensor computation primitives. Experimental results show that TensorIR compilation automatically uses the tensor computation primitives for given hardware backends and delivers performance that is competitive to state-of-art hand-optimized systems across platforms.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

38 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • AKG: automatic kernel generation for neural processing units using polyhedral transformations cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • AKG: automatic kernel generation for neural processing units using polyhedral transformations cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Allo: A Programming Model for Composable Accelerator Design cites PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation
  • Allo: A Programming Model for Composable Accelerator Design cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation cites AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstraction
  • Ansor: Generating High-Performance Tensor Programs for Deep Learning cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites AKG: automatic kernel generation for neural processing units using polyhedral transformations
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstraction cites AKG: automatic kernel generation for neural processing units using polyhedral transformations
  • AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstraction cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstraction cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Mirage: A Multi-Level Superoptimizer for Tensor Programs cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • Mirage: A Multi-Level Superoptimizer for Tensor Programs cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor Transformation cites PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation
  • Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor Transformation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor Transformation cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor Transformation cites AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstraction
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers38

  1. PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph CompilationJason Ansel, Edward Z. Yang, Horace He, Natalia Gimelshein et al.ASPLOS 2024 · 693 citations
  2. SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen et al.ASPLOS 2023 · 86 citations
  3. Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor TransformationLei Wang, Lingxiao Ma, Shijie Cao, Quanlu Zhang et al.OSDI 2024 · 56 citations
  4. Mirage: A Multi-Level Superoptimizer for Tensor ProgramsMengdi Wu, Xinhao Cheng, Shengyu Liu, Chunan Shi et al.OSDI 2025 · 49 citations
  5. Allo: A Programming Model for Composable Accelerator DesignHongzheng Chen, Niansong Zhang, Shaojie Xiang, Zhichen Zeng et al.PLDI 2024 · 41 citations

Builds on7

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 citations
  3. FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous SystemSize Zheng, Yun Liang, Shuo Wang, Renze Chen et al.ASPLOS 2020 · 171 citations
  4. AKG: automatic kernel generation for neural processing units using polyhedral transformationsJie Zhao, Bojie Li, Wang Nie, Zhen Geng et al.PLDI 2021 · 81 citations
  5. AMOS: enabling automatic mapping for tensor computations on spatial accelerators with hardware abstractionSize Zheng, Renze Chen, Anjiang Wei, Yicheng Jin et al.ISCA 2022 · 63 citations

Related papers

  1. Tensor processing primitives: a programming abstraction for efficiency and portability in deep learning workloadsEvangelos Georganas, Dhiraj D. Kalamkar, Sasikanth Avancha, Menachem Adelman et al.SC 2021 · 2 citations
  2. Mosaic: Exploiting Instruction-Level Parallelism on Deep Learning Accelerators with iTex TessellationJianxing Xu, Yuanbo Wen, Zikang Liu, Ruibai Xu et al.ASPLOS 2025 · 2 citations
  3. ALT: Breaking the Wall between Data Layout and Loop Optimizations for Deep Learning CompilationZhiying Xu, Jiafan Xu, Hongding Peng, Wei Wang et al.EuroSys 2023 · 12 citations
  4. Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasksLingxiao Ma, Zhiqiang Xie, Zhi Yang, Jilong Xue et al.OSDI 2020 · 192 citations
  5. Fractal: Joint Multi-Level Sparse Pattern Tuning of Accuracy and Performance for DNN PruningYue Guan, Changming Yu, Yangjie Zhou, Jingwen Leng et al.ASPLOS 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines