ED-Batch: Efficient Automatic Batching of Dynamic Neural Networks via Learned Finite State Machines
Siyuan Chen, Pratik Pramod Fegade, Tianqi Chen, Phillip B. Gibbons, Todd C. Mowry
Abstract
Batching has a fundamental influence on the efficiency of deep neural network (DNN) execution. However, for dynamic DNNs, efficient batching is particularly challenging as the dataflow graph varies per input instance. As a result, state-of-the-art frameworks use heuristics that result in suboptimal batching decisions. Further, batching puts strict restrictions on memory adjacency and can lead to high data movement costs. In this paper, we provide an approach for batching dynamic DNNs based on finite state machines, which enables the automatic discovery of batching policies specialized for each DNN via reinforcement learning. Moreover, we find that memory planning that is aware of the batching policy can save significant data movement overheads, which is automated by a PQ tree-based algorithm we introduce. Experimental results show that our framework speeds up state-of-the-art frameworks by on average 1.15x, 1.39x, and 2.45x for chain-based, tree-based, and lattice-based DNNs across 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 276e6803-0d61-4bb6-8d2d-b1f645b7d0e6Builds on1
Related papers
- DynaHB: A Communication-Avoiding Asynchronous Distributed Framework with Hybrid Batches for Dynamic GNN TrainingZhen Song, Yu Gu, Qing Sun, Tianyi Li et al.VLDB 2024 · 7 citations
- Grape: Practical and Efficient Graphed Execution for Dynamic Deep Neural Networks on GPUsBojian Zheng, Cody Hao Yu, Jie Wang, Yaoyao Ding et al.MICRO 2023 · 4 citations
- SoD2: Statically Optimizing Dynamic Deep Neural Network ExecutionWei Niu, Gagan Agrawal, Bin RenASPLOS 2024 · 6 citations
- RESPECT: Reinforcement Learning based Edge Scheduling on Pipelined Coral Edge TPUsJiaqi Yin, Yingjie Li, Daniel Robinson, Cunxi YuDAC 2023 · 9 citations
- Storage Efficient and Dynamic Flexible Runtime Channel Pruning via Deep Reinforcement LearningJianda Chen, Shangyu Chen, Sinno Jialin PanNeurIPS 2020 · 31 citations
