arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.06858cs.LGcs.DC
收藏

FLUX:通过内核融合在 GPU 上实现基于软件的快速通信重叠

FLUX: Fast Software-based Communication Overlap On GPUs Through Kernel Fusion

ByteDance Ltd(字节跳动有限公司);Peking University(北京大学)

Li-Wen Chang, Wenlei Bao, Qi Hou, Chengquan Jiang, Ningxin Zheng, Yinmin Zhong, Xuanrun Zhang, Zuquan Song, Chengji Yao, Ziheng Jiang, Haibin Lin, Xin Jin, Xin Liu

AI总结:

本文提出 Flux,通过细粒度分解并融合 GPU 通信与计算内核来隐藏张量并行通信延迟,在训练和推理中均取得显著加速。

摘要:

大型深度学习模型已展现出解决众多应用领域中许多任务的强大能力。这些大型模型通常需要以分布式方式进行训练和推理。张量并行是一种常用技术,它将某个操作或层的计算划分到多个设备上,以克服单个处理器的内存容量限制,并/或加速计算以满足特定的延迟要求。然而,这种并行会引入额外通信,而通信可能占据整体运行时间的很大一部分。因此,在具有高速互连的一组设备(例如节点内通过 NVLink 连接的 GPU)中,这限制了该技术的可扩展性。本文提出了一种名为 Flux 的新方法,用于在 GPU 上利用存在依赖关系的计算显著隐藏通信延迟。Flux 将通信和计算操作过度分解为细得多的操作,并进一步将它们融合到一个更大的内核中,从而在不损害内核效率的情况下有效隐藏通信。在给定融合内核的情况下,Flux 潜在可重叠高达 96% 的通信。总体而言,在包含不同 GPU 代际和互连方式的 128 个 GPU 集群上,其训练相比 Megatron-LM 可实现最高 1.24 倍的加速;在包含不同 GPU 代际和互连方式的 8 个 GPU 集群上,其预填充和解码推理相比 vLLM 分别可实现最高 1.66 倍和 1.30 倍的加速。

英文摘要:

Large deep learning models have demonstrated strong ability to solve many tasks across a wide range of applications. Those large models typically require training and inference to be distributed. Tensor parallelism is a common technique partitioning computation of an operation or layer across devices to overcome the memory capacity limitation of a single processor, and/or to accelerate computation to meet a certain latency requirement. However, this kind of parallelism introduces additional communication that might contribute a significant portion of overall runtime. Thus limits scalability of this technique within a group of devices with high speed interconnects, such as GPUs with NVLinks in a node. This paper proposes a novel method, Flux, to significantly hide communication latencies with dependent computations for GPUs. Flux over-decomposes communication and computation operations into much finer-grained operations and further fuses them into a larger kernel to effectively hide communication without compromising kernel efficiency. Flux can potentially overlap up to 96% of communication given a fused kernel. Overall, it can achieve up to 1.24x speedups for training over Megatron-LM on a cluster of 128 GPUs with various GPU generations and interconnects, and up to 1.66x and 1.30x speedups for prefill and decoding inference over vLLM on a cluster with 8 GPUs with various GPU generations and interconnects.

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

↑