TensorIR: An Abstraction for Automatic Tensorized Program Optimization

Siyuan Feng, Bohan Hou, Hongyi Jin, Wuwei Lin, Junru Shao +6 more
7/9/2022
cs.LGcs.AIcs.PL

No official code found. Best implementation: apache/tvm (13,793 stars, Apache-2.0, last commit 2026-04-28).

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 tensor 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.

View on arXivView PDF

Code Implementations(1)

apache/tvmCommunity100%
Apache-2.0

Open Machine Learning Compiler Framework

13,7933,996C, C++Oct 12, 20165 months agoApache-2.0
compilerdeep-learninggpujavascriptmachine-learning+8 more

Similar Papers

Cite this paper

@article{feng2022tensorir,
  title  = {TensorIR: An Abstraction for Automatic Tensorized Program Optimization},
  author = {Siyuan Feng and Bohan Hou and Hongyi Jin and Wuwei Lin and Junru Shao and Ruihang Lai and Zihao Ye and Lianmin Zheng and Cody Hao Yu and Yong Yu and Tianqi Chen},
  year   = {2022},
  eprint = {2207.04296},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.04296v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.04296.svg)](https://codeofpaper.com/paper/2207.04296)

Discussion