Hidet: Task-Mapping Programming Paradigm for Deep Learning Tensor Programs
Yaoyao Ding, Cody Hao Yu, Bojian Zheng, Yizhi Liu, Yida Wang, Gennady Pekhimenko
Abstract
As deep learning models nowadays are widely adopted by both cloud services and edge devices, reducing the latency of deep learning model inferences becomes crucial to provide efficient model serving. However, it is challenging to develop efficient tensor programs for deep learning operators due to the high complexity of modern accelerators (e.g., NVIDIA GPUs and Google TPUs) and the rapidly growing number of operators.
Deep learning compilers, such as Apache TVM, adopt declarative scheduling primitives to lower the bar of developing tensor programs. However, we show that this approach is insufficient to cover state-of-the-art tensor program optimizations (e.g., double buffering). In this paper, we propose to embed the scheduling process into tensor programs and use dedicated mappings, called task mappings, to define the computation assignment and ordering directly in the tensor programs. This new approach greatly enriches the expressible optimizations by allowing developers to manipulate tensor programs at a much finer granularity (e.g., allowing programstatement-level optimizations). We call the proposed method the task-mapping programming paradigm. In addition, we propose a new post-scheduling fusion optimization that allows developers to focus on scheduling every single operator and automates the fusion after scheduling. It greatly reduces the engineering efforts for operator fusion. Our proposed paradigm also constructs an efficient hardware-centric schedule space, which is agnostic to the program input size and greatly reduces the tuning time.
With the proposed paradigm, we implement a deep learning compiler -Hidet. Extensive experiments on modern convolution and transformer models show that Hidet outperforms state-of-theart DNN inference framework, ONNX Runtime, and compiler, TVM equipped with scheduler AutoTVM and Ansor, by up to 1.48× (1.22×
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.
19 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
- PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- MCFuser: High-Performance and Rapid Fusion of Memory-Bound Compute-Intensive Operators cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- MCFuser: High-Performance and Rapid Fusion of Memory-Bound Compute-Intensive Operators cites Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasks
- MCFuser: High-Performance and Rapid Fusion of Memory-Bound Compute-Intensive Operators 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
- EINNET: Optimizing Tensor Programs with Derivation-Based Transformations cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- EINNET: Optimizing Tensor Programs with Derivation-Based Transformations cites Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasks
- EINNET: Optimizing Tensor Programs with Derivation-Based Transformations 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
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization cites Dynamic Tensor Rematerialization
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization cites PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation
- Optimal Kernel Orchestration for Tensor Programs with Korch cites Ansor: Generating High-Performance Tensor Programs for Deep Learning
- Optimal Kernel Orchestration for Tensor Programs with Korch cites EINNET: Optimizing Tensor Programs with Derivation-Based Transformations
- Optimal Kernel Orchestration for Tensor Programs with Korch cites FlexTensor: An Automatic Schedule Exploration and Optimization Framework for Tensor Computation on Heterogeneous System
Cited by top-tier papers19
- 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
- EINNET: Optimizing Tensor Programs with Derivation-Based TransformationsLiyan Zheng, Haojie Wang, Jidong Zhai, Muyan Hu et al.OSDI 2023 · 19 citations
- Optimal Kernel Orchestration for Tensor Programs with KorchMuyan Hu, Ashwin Venkatram, Shreyashri Biswas, Balamurugan Marimuthu et al.ASPLOS 2024 · 11 citations
- MCFuser: High-Performance and Rapid Fusion of Memory-Bound Compute-Intensive OperatorsZheng Zhang, Donglin Yang, Xiaobo Zhou, Dazhao ChengSC 2024 · 9 citations
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-OptimizationZhanda Zhu, Christina Giannoula, Muralidhar Andoorveedu, Qidong Su et al.EuroSys 2025 · 8 citations
Builds on15
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad et al.ACL 2020 · 1,224 citations
- Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 citations
- Rammer: Enabling Holistic Deep Learning Compiler Optimizations with rTasksLingxiao Ma, Zhiqiang Xie, Zhi Yang, Jilong Xue et al.OSDI 2020 · 192 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
- Dynamic Tensor RematerializationMarisa Kirisame, Steven Lyubomirsky, Altan Haan, Jennifer Brennan et al.ICLR 2021 · 115 citations
Related papers
- ATFormer: A Learned Performance Model with Transfer Learning Across Devices for Deep Learning Tensor ProgramsYang Bai, Wenqian Zhao, Shuo Yin, Zixiao Wang et al.EMNLP 2023 · 2 citations
- TLP: A Deep Learning-Based Cost Model for Tensor Program TuningYi Zhai, Yu Zhang, Shuo Liu, Xiaomeng Chu et al.ASPLOS 2023 · 42 citations
- PolyJuice: Detecting Mis-compilation Bugs in Tensor Compilers with Equality Saturation Based RewritingChijin Zhou, Bingzhou Qian, Gwihwan Go, Quan Zhang et al.OOPSLA 2024 · 7 citations
- CDMPP: A Device-Model Agnostic Framework for Latency Prediction of Tensor ProgramsHanpeng Hu, Junwei Su, Juntao Zhao, Yanghua Peng et al.EuroSys 2024 · 7 citations
- EVT: Accelerating Deep Learning Training with Epilogue Visitor TreeZhaodong Chen, Andrew Kerr, Richard Cai, Jack Kosaian et al.ASPLOS 2024 · 5 citations
