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

FastUSP:一种多级协作加速框架用于分布式扩散模型推理

FastUSP: A Multi-Level Collaborative Acceleration Framework for Distributed Diffusion Model Inference

iFLYTEK

Guandong Li

AI总结:

FastUSP通过多级优化提升分布式扩散模型推理效率,重点解决内核启动开销和计算-通信调度问题,实现1.12×-1.16×的加速。

摘要:

大规模扩散模型,如FLUX(12B参数)和Stable Diffusion 3(8B参数),需要多GPU并行计算才能实现高效的推理。统一序列并行(USP),结合Ulysses和环注意力机制,已成为分布式注意力计算的最先进方法。然而,现有USP实现存在显著的低效问题,包括过多的内核启动开销和次优的计算-通信调度。在本文中,我们提出了FastUSP,一种多级优化框架,集成了编译级优化(图编译与CUDA图、计算-通信重排)、通信级优化(FP8量化集体通信)和操作级优化(流水线环注意力与双缓冲)。我们评估了FastUSP在FLUX(12B)和Qwen-Image模型上,跨2、4和8块NVIDIA RTX 5090 GPU。在FLUX上,FastUSP在基准USP上实现了1.12×-1.16×的端到端加速,其中编译级优化贡献了主要的改进。在Qwen-Image上,FastUSP在2块GPU上实现了1.09×的加速;在4-8块GPU上,我们发现PyTorch Inductor与环注意力的兼容性限制阻止了编译优化,而基准USP可扩展到2块GPU性能的1.30×-1.46×。我们进一步提供了分布式扩散推理性能特征的详细分析,揭示了内核启动开销——而不是通信延迟——是现代高速GPU互连的主要瓶颈。

英文摘要:

Large-scale diffusion models such as FLUX (12B parameters) and Stable Diffusion 3 (8B parameters) require multi-GPU parallelism for efficient inference. Unified Sequence Parallelism (USP), which combines Ulysses and Ring attention mechanisms, has emerged as the state-of-the-art approach for distributed attention computation. However, existing USP implementations suffer from significant inefficiencies including excessive kernel launch overhead and suboptimal computation-communication scheduling. In this paper, we propose \textbf{FastUSP}, a multi-level optimization framework that integrates compile-level optimization (graph compilation with CUDA Graphs and computation-communication reordering), communication-level optimization (FP8 quantized collective communication), and operator-level optimization (pipelined Ring attention with double buffering). We evaluate FastUSP on FLUX (12B) and Qwen-Image models across 2, 4, and 8 NVIDIA RTX 5090 GPUs. On FLUX, FastUSP achieves consistent \textbf{1.12$\times$--1.16$\times$} end-to-end speedup over baseline USP, with compile-level optimization contributing the dominant improvement. On Qwen-Image, FastUSP achieves \textbf{1.09$\times$} speedup on 2 GPUs; on 4--8 GPUs, we identify a PyTorch Inductor compatibility limitation with Ring attention that prevents compile optimization, while baseline USP scales to 1.30$\times$--1.46$\times$ of 2-GPU performance. We further provide a detailed analysis of the performance characteristics of distributed diffusion inference, revealing that kernel launch overhead -- rather than communication latency -- is the primary bottleneck on modern high-bandwidth GPU interconnects.

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

↑