Nvidia Hopper GPU 大模型推理时 GPU 利用率分析研究
Dissecting GPU Utilization for LLM Inference on Nvidia Hopper
这个研究很实用,帮你理解为什么你的大模型推理时 GPU 利用率看起来很高,但实际计算效率可能很低。作者用具体的技术(vLLM、FlashAttention-3)和硬件(H100)做了实验,结论很扎实。
这篇论文分析了在 Nvidia Hopper 架构上运行大语言模型推理时,GPU 利用率指标可能存在的不准确之处。作者使用 vLLM 和 FlashAttention-3 在 H100 上测试了不同批量和序列长度的场景,并提出了八个基于原始 Nsight Compute 报告的利用率视图,以更精确地反映 GPU 的实际工作情况。
Dissecting GPU Utilization for LLM Inference on Nvidia Hopper
A single SM utilization percentage can make an LLM inference workload look compute-saturated while hiding how much useful work is being done. The problem is not that the counter is wrong, but that it collapses several different mechanisms into one number. This is most severe during decode, where each request contributes only one new token and dense projection GEMMs become small-row matrix multiplications. On Hopper, the bfloat16 GMMA path executes these operations in fixed 64-row matrix fragments, so small-batch decode can fill only a small fraction of each fragment with real token rows. In this paper, we profile vLLM with FlashAttention-3 and cuBLASLt on an H100 NVL across cold prefill, warm prefill, and decode, sweeping sequence length and batch size. We replace the usual single utilization number with eight counter-validated views derived from raw Nsight Compute reports, each pinned to an NCU counter or explicit formula. Together, these views map utilization gaps to concrete mechanisms - fragment fill, occupancy limits, stall signatures, wave quantization, and kernel selection - across four production models and six per-layer kernel roles.
- 宝玉09-12 18:10原文