通过集群级通信原语,让大模型推理更高效。
ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective Primitive
- 用集群级规约与汇聚原语实现线程块间高速通信。
- 在H100上平均降低1.61倍端到端延迟。
- 适合追求低延迟的LLM推理优化研究者。
大型语言模型解码因算子间执行碎片化及依赖片外内存进行数据交换和规约,导致高延迟。当前架构如NVIDIA Hopper虽提供分布式共享内存和低延迟集群内互联,但仅暴露底层数据移动指令,缺乏面向集体片上通信的结构化抽象。为此,我们提出两种集群级通信原语——ClusterReduce与ClusterGather,抽象常见通信模式,支持线程块间结构化、高速的数据交换与规约,使中间结果全程驻留片上内存,无需访问片外内存。基于此,设计ClusterFusion执行框架,联合调度通信与计算,将解码阶段如QKV投影、注意力、输出投影组合成单一融合核函数。在H100 GPU上的评估显示,ClusterFusion在不同模型与配置下,平均端到端延迟比现有先进推理框架降低1.61倍。源码见https://github.com/xinhao-luo/ClusterFusion。
原文摘要 · Abstract (English)
Large language model (LLM) decoding suffers from high latency due to fragmented execution across operators and heavy reliance on off-chip memory for data exchange and reduction. This execution model limits opportunities for fusion and incurs significant memory traffic and kernel launch overhead. While modern architectures such as NVIDIA Hopper provide distributed shared memory and low-latency intra-cluster interconnects, they expose only low-level data movement instructions, lacking structured abstractions for collective on-chip communication. To bridge this software-hardware gap, we introduce two cluster-level communication primitives, ClusterReduce and ClusterGather, which abstract common communication patterns and enable structured, high-speed data exchange and reduction between thread blocks within a cluster, allowing intermediate results to be on-chip without involving off-chip memory. Building on these abstractions, we design ClusterFusion, an execution framework that schedules communication and computation jointly to expand operator fusion scope by composing decoding stages such as QKV Projection, Attention, and Output Projection into a single fused kernels. Evaluations on H100 GPUs show that ClusterFusion outperforms state-of-the-art inference frameworks by 1.61x on average in end-to-end latency across different models and configurations. The source code is available at https://github.com/xinhao-luo/ClusterFusion.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。