Lune

OSDI2021Top-tier venue

PET: Optimizing Tensor Programs with Partially Equivalent Transformations and Automated Corrections

Haojie Wang, Jidong Zhai, Mingyu Gao, Zixuan Ma, Shizhi Tang, Liyan Zheng, Yuanzhi Li, Kaiyuan Rong, Yuanyong Chen, Zhihao Jia

Abstract

High-performance tensor programs are critical for efficiently deploying deep neural network (DNN) models in realworld tasks. Existing frameworks optimize tensor programs by applying fully equivalent transformations, which maintain equivalence on every element of output tensors. This approach misses possible optimization opportunities as transformations that only preserve equivalence on subsets of the output tensors are excluded.

We propose PET, the first DNN framework that optimizes tensor programs with partially equivalent transformations and automated corrections. PET discovers and applies program transformations that improve computation efficiency but only maintain partial functional equivalence. PET then automatically corrects results to restore full equivalence. We develop rigorous theoretical foundations to simplify equivalence examination and correction for partially equivalent transformations, and design an efficient search algorithm to quickly discover highly optimized programs by combining fully and partially equivalent optimizations at the tensor, operator, and graph levels. Our evaluation shows that PET outperforms existing systems by up to 2.5×, by unlocking previously missed opportunities from partially equivalent transformations.

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.

36 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

  • Zeus: Understanding and Optimizing GPU Energy Consumption of DNN Training cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification cites Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and Parallelization
  • Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep Learning cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and Parallelization cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
  • Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and Parallelization cites Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep Learning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers36

  1. Zeus: Understanding and Optimizing GPU Energy Consumption of DNN TrainingJie You, Jae-Won Chung, Mosharaf ChowdhuryNSDI 2023 · 220 citations
  2. SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and VerificationXupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng et al.ASPLOS 2024 · 105 citations
  3. Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and ParallelizationColin Unger, Zhihao Jia, Wei Wu, Sina Lin et al.OSDI 2022 · 105 citations
  4. Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep LearningLianmin Zheng, Zhuohan Li, Hao Zhang, Yonghao Zhuang et al.OSDI 2022 · 75 citations
  5. Quartz: superoptimization of Quantum circuitsMingkuan Xu, Zikun Li, Oded Padon, Sina Lin et al.PLDI 2022 · 57 citations

Builds on2

  1. Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 citations
  2. Automatic generation of efficient sparse tensor format conversion routinesStephen Chou, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2020 · 26 citations

Related papers

  1. EINNET: Optimizing Tensor Programs with Derivation-Based TransformationsLiyan Zheng, Haojie Wang, Jidong Zhai, Muyan Hu et al.OSDI 2023 · 19 citations
  2. ETO: Accelerating Optimization of DNN Operators by High-Performance Tensor Program ReuseJingzhi Fang, Yanyan Shen, Yue Wang, Lei ChenVLDB 2022 · 10 citations
  3. Felix: Optimizing Tensor Programs with Gradient DescentYifan Zhao, Hashim Sharif, Vikram S. Adve, Sasa MisailovicASPLOS 2024 · 13 citations
  4. Mirage: A Multi-Level Superoptimizer for Tensor ProgramsMengdi Wu, Xinhao Cheng, Shengyu Liu, Chunan Shi et al.OSDI 2025 · 49 citations
  5. Accelerating applications using edge tensor processing unitsKuan-Chieh Hsu, Hung-Wei TsengSC 2021 · 33 citations
Dusk over the sea between two cliffs drawn in fine vertical lines