Lune

OSDI2024Top-tier venue

Enabling Tensor Language Model to Assist in Generating High-Performance Tensor Programs for Deep Learning

Yi Zhai, Sijia Yang, Keyu Pan, Renwei Zhang, Shuo Liu, Chao Liu, Zichun Ye, Jianmin Ji, Jie Zhao, Yu Zhang, Yanyong Zhang

Abstract

Obtaining high-performance tensor programs with high efficiency continues to be a substantial challenge. Approaches that favor efficiency typically limit their exploration space through heuristic constraints, which often lack generalizability. Conversely, approaches targeting high performance tend to create an expansive exploration space but employ ineffective exploration strategies.

We propose a tensor program generation framework for deep learning applications. Its core idea involves maintaining an expansive space to ensure high performance while performing powerful exploration with the help of language models to generate tensor programs efficiently. We thus transform the tensor program exploration task into a language model generation task. To facilitate this, we explicitly design the language model-friendly tensor language that records decision information to represent tensor programs. During the compilation of target workloads, the tensor language model (TLM) combines knowledge from offline learning and previously made decisions to probabilistically sample the best decision in the current decision space. This approach allows more informed space exploration than random sampling commonly used in previously proposed approaches.

Experimental results indicate that TLM excels in delivering both efficiency and performance. Compared to fully tuned Ansor/MetaSchedule, TLM matches their performance with a compilation speedup of 61×. Furthermore, when evaluated against Roller, with the same compilation time, TLM improves the performance by 2.25×. Code available at https://github.com/zhaiyi000/tlm.

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.

5 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

  • Pruner: A Draft-then-Verify Exploration Mechanism to Accelerate Tensor Program Tuning cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • Pruner: A Draft-then-Verify Exploration Mechanism to Accelerate Tensor Program Tuning cites Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasks
  • Pruner: A Draft-then-Verify Exploration Mechanism to Accelerate Tensor Program Tuning cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Ansor: Generating High-Performance Tensor Programs for Deep Learning cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasks cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
  • Bayesian Code Diffusion for Efficient Automatic Deep Learning Program Optimization cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • A ve : Guiding Agentic GPU Optimization Using Data-Flow Invariants cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • A ve : Guiding Agentic GPU Optimization Using Data-Flow Invariants cites Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasks
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. QiMeng-Kernel: Macro-Thinking Micro-Coding Paradigm for LLM-Based High-Performance GPU Kernel GenerationXinguo Zhu, Shaohui Peng, Jiaming Guo, Yunji Chen et al.AAAI 2026 · 9 citations
  2. Pruner: A Draft-then-Verify Exploration Mechanism to Accelerate Tensor Program TuningLiang Qiao, Jun Shi, Xiaoyu Hao, Xi Fang et al.ASPLOS 2025 · 5 citations
  3. EGG: An Expert-Guided Agent Framework for Kernel GenerationYaochen Han, Ke Fan, Hongxu Jiang, Wanqi Xu et al.ICML 2026
  4. Bayesian Code Diffusion for Efficient Automatic Deep Learning Program OptimizationIsu Jeong, Seulki LeeOSDI 2025
  5. A ve : Guiding Agentic GPU Optimization Using Data-Flow InvariantsHaohui Mai, Xiaoyan Guo, Xiangyun Ding, Daifeng Li et al.SOSP 2026

Builds on10

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 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. 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

Related papers

  1. Tensor Program Optimization with Probabilistic ProgramsJunru Shao, Xiyou Zhou, Siyuan Feng, Bohan Hou et al.NeurIPS 2022 · 85 citations
  2. TLP: A Deep Learning-Based Cost Model for Tensor Program TuningYi Zhai, Yu Zhang, Shuo Liu, Xiaomeng Chu et al.ASPLOS 2023 · 42 citations
  3. Felix: Optimizing Tensor Programs with Gradient DescentYifan Zhao, Hashim Sharif, Vikram S. Adve, Sasa MisailovicASPLOS 2024 · 13 citations
  4. Hidet: Task-Mapping Programming Paradigm for Deep Learning Tensor ProgramsYaoyao Ding, Cody Hao Yu, Bojian Zheng, Yizhi Liu et al.ASPLOS 2023 · 27 citations
  5. FreeTensor: a free-form DSL with holistic optimizations for irregular tensor programsShizhi Tang, Jidong Zhai, Haojie Wang, Lin Jiang et al.PLDI 2022 · 16 citations
Dusk over the sea between two cliffs drawn in fine vertical lines