arXiv:2504.19519cs.DCcs.CL2025-04被引 8

通过信号触发实现计算通信重叠,显著提升多GPU生成模型效率

Efficient and Adaptable Overlapping for Computation and Communication via Signaling and Reordering

  • 用信号机制按块触发通信,实现计算与通信的精准重叠
  • 在消费级GPU上最高提速1.65倍,优于现有方法
  • 无需修改通信接口,适合快速适配不同模型和硬件

生成模型在多个应用中取得显著成功,推动了多GPU计算需求。在多GPU系统中,跨GPU通信成为瓶颈,尤其在消费级GPU上更为突出。通过利用硬件并发执行能力,将计算与通信延迟重叠是缓解通信开销的有效方法。我们发现高效且可适应的重叠设计需满足三点:(1)按块重叠以最大化重叠机会,(2)无干扰计算以保持原始计算性能,(3)通信无关性以降低对不同通信原语的开发负担。然而,现有方案无法同时优化这三项特性。为此,我们提出FlashOverlap,采用新颖的信号机制:当部分输出完成时,计算核发送信号触发该部分通信,同时继续剩余部分的计算(无干扰计算),从而实现已完成部分的通信与未完成部分的计算重叠。在此基础上,FlashOverlap包含两个核心组件:(1)确定信号触发时机以提升重叠效率(按块重叠),(2)预通信重排序生成连续地址,使通信仅需调用NCCL API(通信无关性),并附带后通信重排序恢复数据顺序。实验表明,FlashOverlap在多数情况下实现最高1.65倍的加速,优于现有方法。代码已公开于https://github.com/infinigence/FlashOverlap。

原文摘要 · Abstract (English)

Generative models have achieved remarkable success across various applications, driving the demand for multi-GPU computing. Inter-GPU communication becomes a bottleneck in multi-GPU computing systems, particularly on consumer-grade GPUs. By exploiting concurrent hardware execution, overlapping computation and communication latency becomes an effective technique for mitigating the communication overhead. We identify that an efficient and adaptable overlapping design should satisfy (1) tile-wise overlapping to maximize the overlapping opportunity, (2) interference-free computation to maintain the original computational performance, and (3) communication agnosticism to reduce the development burden against varying communication primitives. Nevertheless, current designs fail to simultaneously optimize for all of those features. To address the issue, we propose FlashOverlap, which utilizes a novel signaling mechanism: when part of the output finishes, the computation kernel sends a signal to trigger the communication of that part, while continuing the computation of the remaining part (interference-free computation). Consequently, the communication of the finished part and the computation of the remaining part can be overlapped. On top of the signaling mechanism, FlashOverlap comprises two key components: (1) the determination of the signaling timing to boost the overlap efficiency (tile-wise overlapping), and (2) a pre-communication reordering to create the contiguous address for finished data, enabling communication by simply calling NCCL APIs (communication agnosticism), and a post-communication reordering to correct the data order. Experiments show that FlashOverlap achieves up to 1.65x speedup through overlap, outperforming existing works in most cases. Code is available at https://github.com/infinigence/FlashOverlap.

多GPU计算通信重叠生成模型NCCL

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。