arXiv:2504.11750cs.DCcs.AI2025-04中稿 · ISPASS 2025被引 17

分析大模型推理在异构架构上的性能瓶颈,发现小批量时CPU成关键短板。

Characterizing and Optimizing LLM Inference Workloads on CPU-GPU Coupled Architectures

  • 通过细粒度追踪分析不同架构下算子执行行为
  • GH200在大批量时快1.9到2.7倍,但小批量仍受CPU限制
  • 提出核融合可降低启动开销,适合优化低批量场景

基于大语言模型(LLM)的推理工作负载正日益主导数据中心成本与资源占用。本文深入分析了在松耦合(PCIe A100/H100)和紧耦合(GH200)系统上LLM推理的行为特征。借助新型分析工具SKIP及总核启动与排队时间(TKLQT)等指标,我们进行了细粒度的操作符到核函数的追踪分析。结果显示,在大批次下,紧耦合(CC)GH200系统显著优于松耦合(LC)系统,对Llama 3.2-1B实现1.9x–2.7x的前填充延迟加速。然而,分析也发现,GH200在高达LC系统4倍的大批次下仍处于CPU受限状态。在此扩展的CPU受限区域内,我们识别出Grace CPU的性能特征是导致其在低批次下延迟更高的关键因素。实验表明,TKLQT能准确捕捉该CPU/GPU受限转换点。基于此,我们进一步证明核融合可显著缓解GH200在低批次下的延迟瓶颈,减少核启动开销。本研究为优化多样化的CPU-GPU耦合策略提供了关键洞见。此项工作为初步探索,未来将扩展至其他需不同程度异构架构的AI/深度学习工作负载。

原文摘要 · Abstract (English)

Large language model (LLM)-based inference workloads increasingly dominate data center costs and resource utilization. Therefore, understanding the inference workload characteristics on evolving CPU-GPU coupled architectures is crucial for optimization. This paper presents an in-depth analysis of LLM inference behavior on loosely-coupled (PCIe A100/H100) and closely-coupled (GH200) systems. We analyze performance dynamics using fine-grained operator-to-kernel trace analysis, facilitated by our novel profiler SKIP and metrics like Total Kernel Launch and Queuing Time (TKLQT). Results show that closely-coupled (CC) GH200 significantly outperforms loosely-coupled (LC) systems at large batch sizes, achieving 1.9x-2.7x faster prefill latency for Llama 3.2-1B. However, our analysis also reveals that GH200 remains CPU-bound up to 4x larger batch sizes than LC systems. In this extended CPU-bound region, we identify the performance characteristics of the Grace CPU as a key factor contributing to higher inference latency at low batch sizes on GH200. We demonstrate that TKLQT accurately identifies this CPU/GPU-bound transition point. Based on this analysis, we further show that kernel fusion offers significant potential to mitigate GH200's low-batch latency bottleneck by reducing kernel launch overhead. This detailed kernel-level characterization provides critical insights for optimizing diverse CPU-GPU coupling strategies. This work is an initial effort, and we plan to explore other major AI/DL workloads that demand different degrees of CPU-GPU heterogeneous architectures.

大模型推理异构计算性能优化核融合

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