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

针对大语言模型系统的GPU内核库中存在问题的实证研究

An Empirical Study of Issues in GPU Kernel Libraries for LLM Systems

Microsoft Research Asia(微软研究院亚洲研究院);Tsinghua University(清华大学)

Yanjie Gao, Jiayi Bi, Haoxiang Lin, Ling Feng

AI总结:

本文通过分析7款GPU内核库的300份GitHub问题,揭示其60.33%问题源于编译/运行时环境,指出内核特化的隐式约束及现有测试调试的不足,提出相关研究与工具方向。

摘要:

大语言模型(LLM)在各应用领域的广泛应用背后,是对专用GPU内核库的依赖日益增强。这些库支撑着不同GPU平台上训练与推理的正确性和效率,实现了注意力机制、通用矩阵乘法(GEMM)、量化及低精度算子,同时管理张量形状、内存布局、代码生成和硬件特定调度。该层面的问题可能会悄悄破坏输出结果、导致GPU挂起、阻止编译、引发部署不兼容或降低性能,从而降低开发者生产力并浪费昂贵的GPU资源。本文针对大语言模型系统的GPU内核库中的问题开展了首次全面的实证研究,手动分析了来自7个代表性库(FlashInfer、FlashAttention、Triton、CUTLASS、DeepGEMM、xFormers和bitsandbytes)的300份高质量GitHub问题报告、相关讨论及可用修复方案。该分析对症状、根本原因、修复方案以及测试和调试实践进行了特征刻画。主要发现包括:(1)60.33%的抽样问题源于编译器与构建系统或运行时环境维度,因此验证必须覆盖部署和执行栈,而非仅内核代码;(2)内核特化对张量形状、元数据布局、内存别名和硬件资源施加了隐式正确性约束,即使是受支持的操作,违反这些约束也会产生错误输出或启动失败,凸显了显式契约验证和边界情况测试的必要性;(3)当前的测试和调试实践往往不足以识别低精度数值问题和硬件特定执行故障。本文还概述了支持未来LLM GPU内核开发的研究机会和工具方向。

英文摘要:

Behind the expanding use of large language models (LLMs) across application domains lies a growing dependence on specialized GPU kernel libraries. These libraries underpin the correctness and efficiency of training and inference across diverse GPU platforms, implementing attention, GEMM, quantization, and low-precision operators while managing tensor shapes, memory layouts, code generation, and hardware-specific dispatch. Problems at this layer can silently corrupt outputs, hang GPUs, prevent compilation, introduce deployment incompatibilities, or degrade performance, thereby reducing developer productivity and wasting expensive GPU resources. We present the first comprehensive empirical study of issues in GPU kernel libraries for LLM systems. We manually analyzed 300 high-quality GitHub issue reports, their discussions, and available fixes from seven representative libraries: FlashInfer, FlashAttention, Triton, CUTLASS, DeepGEMM, xFormers, and bitsandbytes. The analysis characterizes symptoms, root causes, fixes, and testing and debugging practices. Our main findings are: (1) 60.33% of the sampled issues originate in the Compiler and Build System or Runtime Environment dimensions, so validation must cover the deployment and execution stack, not just kernel code. (2) Kernel specialization imposes implicit correctness constraints on tensor shapes, metadata layouts, memory aliasing, and hardware resources. Violations can produce incorrect outputs or launch failures even for supported operations, highlighting the need for explicit contract validation and boundary-case testing. (3) Current testing and debugging practices are often insufficient for identifying low-precision numerical problems and hardware-specific execution failures. We outline research opportunities and tooling directions to support future LLM GPU kernel development.

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

↑