一句话:提出动态分析工具 dl²,通过执行图与等待图检测深度学习作业的通信死锁并支持重放诊断。
分布式深度学习训练中,通信死锁会使进程无限等待网络消息,造成资源浪费与生产力下降;现有死锁处理方法难以适配深度学习特有的混合编程范式,或会限制优化机会。本文提出 dl²,一个检测深度学习作业通信死锁的动态分析工具。dl² 将作业的运行时 trace 建模为执行图,检测不匹配的通信,并构造等待图以识别死锁环;它还能处理非确定性通信行为,提供重放与诊断支持以辅助根因分析。作者使用 PyTorch,结合合成测试用例和真实深度学习负载进行评估。实验结果表明,dl² 能成功检测所有通信死锁,精确率和召回率均达到 100%,验证了其有效性。
In recent years, deep learning has seen widespread adoption across various domains, giving rise to large-scale models such as large language models. Training these models, particularly in distributed environments, presents substantial computational and communication challenges. A critical issue is the communication deadlock—a state in which processes become indefinitely stalled while awaiting network messages from others, which leads to resource wastage and reduced productivity. Current approaches to deadlock handling are either unsuitable for deep learning due to its unique hybrid programming paradigm or limit optimization opportunities. This paper presents dl2, a novel dynamic analysis tool designed to detect communication deadlocks in deep learning jobs. dl2 models the runtime trace of a job as an execution graph, detects unmatched communications, and constructs a wait-for graph to identify deadlock cycles. dl2 can also handle nondeterministic communication behaviors, providing replay and diagnostic support for root cause analysis. We evaluate dl2 using PyTorch with a combination of synthetic test cases and real-world deep learning workloads. The experimental results show that dl2 successfully detects all communication deadlocks, achieving 100% precision and recall, which highlights its effectiveness.