Bayesian Code Diffusion for Efficient Automatic Deep Learning Program Optimization
Isu Jeong, Seulki Lee
Abstract
We introduce Bayesian code diffusion, a new deep learning program optimization strategy devised to accelerate the autotuning process of deep learning compilers. Using the concepts of prior and posterior distributions in the Bayesian framework and reformulating them in the context of deep learning program optimization, the proposed approach efficiently searches for optimal program code in a significantly reduced search space through an iterative diffusion of program code. To further enhance the efficiency of program optimization, we propose pre-training and fine-tuning for the cost model, which improves both the model's predictive accuracy and training efficiency. We implement Bayesian code diffusion in Ansor and evaluate its performance on a wide range of deep learning models on both CPUs and GPUs. Existing approaches struggle to reliably generate high-performing deep learning programs, i.e. achieving low program execution latency, across various configurations, including diverse deep learning model architectures and hardware platforms (CPU and GPU). In contrast, Bayesian code diffusion reduces the end-to-end compilation (optimization) time required to generate the equivalent program execution latency in various configurations, i.e., achieving up to 3.31× optimization speedup. This substantial improvement demonstrates that Bayesian code diffusion performs efficient and principled deep learning program optimization across a wide range of deep learning models, operators, and hardware (CPU and GPU).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 96fc6afc-a791-4558-8c1f-7fb9c546cf82Builds on10
- Ansor: Generating High-Performance Tensor Programs for Deep LearningLianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu et al.OSDI 2020 · 551 citations
- Nimble: Lightweight and Parallel GPU Task Scheduling for Deep LearningWoosuk Kwon, Gyeong-In Yu, Eunji Jeong, Byung-Gon ChunNeurIPS 2020 · 102 citations
- Chameleon: Adaptive Code Optimization for Expedited Deep Neural Network CompilationByung Hoon Ahn, Prannoy Pilligundla, Amir Yazdanbakhsh, Hadi EsmaeilzadehICLR 2020 · 90 citations
- Tensor Program Optimization with Probabilistic ProgramsJunru Shao, Xiyou Zhou, Siyuan Feng, Bohan Hou et al.NeurIPS 2022 · 85 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
Related papers
- ALT: Breaking the Wall between Data Layout and Loop Optimizations for Deep Learning CompilationZhiying Xu, Jiafan Xu, Hongding Peng, Wei Wang et al.EuroSys 2023 · 12 citations
- DynaTune: Dynamic Tensor Program Optimization in Deep Neural Network CompilationMinjia Zhang, Menghao Li, Chi Wang, Mingqin LiICLR 2021 · 18 citations
- AdaTune: Adaptive Tensor Program Compilation Made EfficientMenghao Li, Minjia Zhang, Chi Wang, Mingqin LiNeurIPS 2020 · 39 citations
- Glimpse: mathematical embedding of hardware specification for neural compilationByung Hoon Ahn, Sean Kinzer, Hadi EsmaeilzadehDAC 2022 · 4 citations
- Efficient Compiler Autotuning via Bayesian OptimizationJunjie Chen, Ningxin Xu, Peiqi Chen, Hongyu ZhangICSE 2021 · 73 citations
