arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.09983cs.DC
收藏

DeepCompile: 一种基于编译器的分布式深度学习训练优化方法

DeepCompile: A Compiler-Driven Approach to Optimizing Distributed Deep Learning Training

Microsoft(微软);University of Virginia(弗吉尼亚大学)

Masahiro Tanaka, Du Li, Umesh Chand, Ali Zafar, Haiying Shen, Olatunji Ruwase

AI总结:

DeepCompile通过编译器驱动的优化方法,提升分布式深度学习训练的效率和吞吐量。

摘要:

深度学习模型的快速增长增加了对高效分布式训练策略的需求。完全分片方法如ZeRO-3和FSDP将模型参数分布在GPU之间,并应用诸如预取和去分片等优化来减少通信开销。然而,这些系统缺乏对内存和通信调度的细粒度控制,使难以平衡计算-通信重叠与内存需求。协调多个优化如预取和去分片也困难,因为它们对内存使用的影响可能相互影响。为解决这些挑战,我们提出了DeepCompile,一种用于分布式训练的编译器优化框架。DeepCompile将用户定义的模型转换为计算图,并应用一系列基于性能分析的优化步骤,每个步骤根据执行时间和内存使用等性能信息修改图。这种设计允许每个步骤灵活地插入、重新排列或删除如all-gather和内存分配等操作,提高计算-通信重叠并减少内存压力。每个步骤可以访问先前步骤更新的性能反馈,实现协调优化。我们进一步通过三种额外优化增强了DeepCompile:主动预取、选择性去分片和自适应卸载。我们的评估显示,DeepCompile在ZeRO-3和FSDP基准上分别实现了1.28倍和1.54倍的加速,并在有限GPU资源设置中通过卸载实现了7.01倍的吞吐量提升。

英文摘要:

The rapid growth of deep learning models has increased the demand for efficient distributed training strategies. Fully sharded approaches like ZeRO-3 and FSDP partition model parameters across GPUs and apply optimizations such as prefetching and unsharding to reduce communication overhead. However, these systems lack fine-grained control over memory and communication scheduling, making it difficult to balance computation--communication overlap with memory requirements. Coordinating multiple optimizations such as prefetching and unsharding is also difficult, since their effects on memory usage can influence each other. To tackle these challenges, we propose DeepCompile, a compiler-based optimization framework for distributed training. DeepCompile transforms user-defined models into computation graphs and applies a series of profiling-guided optimization passes, each modifying the graph based on profiling information such as execution time and memory usage. This design allows each pass to flexibly insert, reorder, or remove operations such as all-gather and memory allocation, improving communication--computation overlap and reducing memory pressure. Each pass can access updated profiling feedback from earlier passes, enabling coordinated optimizations. We further enhance DeepCompile by three additional optimizations: proactive prefetching, selective unsharding, and adaptive offloading. Our evaluation shows that DeepCompile achieves up to 1.28$\times$ and 1.54$\times$ speedups over ZeRO-3 and FSDP baselines, respectively, and up to a 7.01$\times$ throughput increase in settings with limited GPU resources using offloading.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑