Mirage: A Multi-Level Superoptimizer for Tensor Programs
Mengdi Wu, Xinhao Cheng, Shengyu Liu, Chunan Shi, Jianan Ji, Man Kit Ao, Praveen Velliengiri, Xupeng Miao, Oded Padon, Zhihao Jia
Abstract
We introduce Mirage, the first multi-level superoptimizer for tensor programs. A key idea in Mirage is Graphs, a uniform representation of tensor programs at the kernel, thread block, and thread levels of the GPU compute hierarchy. Graphs enable Mirage to discover novel optimizations that combine algebraic transformations, schedule transformations, and generation of new custom kernels. To navigate the large search space, Mirage introduces a pruning technique based on abstraction that significantly reduces the search space and provides a certain optimality guarantee. To ensure that the optimized Graph is equivalent to the input program, Mirage introduces a probabilistic equivalence verification procedure with strong theoretical guarantees. Our evaluation shows that Mirage outperforms existing approaches by up to 3.3 even for DNNs that are widely used and heavily optimized. Mirage is publicly available at https://github.com/mirage-project/mirage.
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.
21 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Syncopate: Efficient Multi-GPU AI Kernels via Automatic Chunk-Centric Compute-Communication Overlap cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- Syncopate: Efficient Multi-GPU AI Kernels via Automatic Chunk-Centric Compute-Communication Overlap cites TensorIR: An Abstraction for Automatic Tensorized Program Optimization
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs cites TensorIR: An Abstraction for Automatic Tensorized Program Optimization
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs cites PET: Optimizing Tensor Programs with Partially Equivalent Transformations and Automated Corrections
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs cites Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and Parallelization
- Ansor: Generating High-Performance Tensor Programs for Deep Learning cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
- TensorIR: An Abstraction for Automatic Tensorized Program Optimization cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- TensorIR: An Abstraction for Automatic Tensorized Program Optimization cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
- PET: Optimizing Tensor Programs with Partially Equivalent Transformations and Automated Corrections 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 PET: Optimizing Tensor Programs with Partially Equivalent Transformations and Automated Corrections
Cited by top-tier papers21
- vAttention: Dynamic Memory Management for Serving LLMs without PagedAttentionRamya Prabhu, Ajay Nayak, Jayashree Mohan, Ramachandran Ramjee et al.ASPLOS 2025 · 38 citations
- MPK: A Compiler and Runtime for Mega-Kernelizing Tensor ProgramsXinhao Cheng, Zhihao Zhang, Yu Zhou, Jianan Ji et al.OSDI 2026 · 20 citations
- HyGen: Efficient LLM Serving via Elastic Online-Offline Request Co-locationTing Sun, Penghan Wang, Fan LaiNeurIPS 2025 · 17 citations
- 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
- Syncopate: Efficient Multi-GPU AI Kernels via Automatic Chunk-Centric Compute-Communication OverlapXinwei Qiang, Yue Guan, Zhengding Hu, Keren Zhou et al.OSDI 2026 · 3 citations
Builds on12
- Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 citations
- 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
- 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
- TensorIR: An Abstraction for Automatic Tensorized Program OptimizationSiyuan Feng, Bohan Hou, Hongyi Jin, Wuwei Lin et al.ASPLOS 2023 · 80 citations
- PET: Optimizing Tensor Programs with Partially Equivalent Transformations and Automated CorrectionsHaojie Wang, Jidong Zhai, Mingyu Gao, Zixuan Ma et al.OSDI 2021 · 77 citations
Related papers
- Optimal Kernel Orchestration for Tensor Programs with KorchMuyan Hu, Ashwin Venkatram, Shreyashri Biswas, Balamurugan Marimuthu et al.ASPLOS 2024 · 11 citations
- Tensor Program Optimization with Probabilistic ProgramsJunru Shao, Xiyou Zhou, Siyuan Feng, Bohan Hou et al.NeurIPS 2022 · 85 citations
- Graphene: An IR for Optimized Tensor Computations on GPUsBastian Hagedorn, Bin Fan, Hanfeng Chen, Cris Cecka et al.ASPLOS 2023 · 30 citations
- EINNET: Optimizing Tensor Programs with Derivation-Based TransformationsLiyan Zheng, Haojie Wang, Jidong Zhai, Muyan Hu et al.OSDI 2023 · 19 citations
- Optimizing Deep Learning Inference via Global Analysis and Tensor ExpressionsChunwei Xia, Jiacheng Zhao, Qianqi Sun, Zheng Wang et al.ASPLOS 2024 · 14 citations
