arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.08455cs.LGcs.PLcs.SE
收藏

CUDABeaver:基于LLM的自动化CUDA调试基准测试

CUDABeaver: Benchmarking LLM-Based Automated CUDA Debugging

University of Minnesota(明尼苏达大学)

Shiyang Li, Haoyang Chen, Mattia Fazzini, Caiwen Ding

AI总结:

提出CUDABEAVER基准,通过协议条件指标pass@k(M,C,A)评估LLM修复CUDA代码的能力,揭示性能损失容忍度对成功率的影响。

摘要:

调试CUDA程序长期以来一直具有挑战性,因为故障通常源于硬件行为、编译器决策、内存层次结构和异步执行之间微妙的交互。更重要的是,随着GPU在科学计算、机器学习、图形和系统工作负载中的快速扩展,CUDA调试变得比以往任何时候都更具挑战性。当前对基于LLM的CUDA编程的评估大多忽略了这一场景:模型可以通过退化性修复通过正确性测试,将CUDA代码简化为更安全但更慢的程序,从而放弃原始优化结构。我们引入了CUDABEAVER,一个从基于LLM的CUDA生成过程中产生的真实失败工作空间中进行CUDA调试的基准。每个任务提供损坏的候选代码、原生构建/测试命令、原始错误证据以及一个可编辑文件。CUDABEAVER评估修复程序是否真正修复了失败的CUDA代码,还是仅仅找到了一个更慢的通过测试的替代方案,并按故障类别、调试轨迹、停滞模式和性能保持情况报告结果。我们进一步提出了pass@k(M,C,A),一种协议条件的CUDA调试指标,通过明确修复程序M、语料库C和协议轴A。使用该指标在213个任务和七个前沿LLM上,我们表明协议感知评估提供了更真实的CUDA调试能力视图:当性能损失容忍度高时,修复程序看起来更强,但即使是一个微小的更严格的性能要求也能显著降低测量成功率,分数变化高达40个百分点。

英文摘要:

Debugging CUDA programs has long been challenging because failures often arise from subtle interactions among hardware behavior, compiler decisions, memory hierarchy, and asynchronous execution. More importantly, with the rapid expansion of GPU usage across scientific computing, machine learning, graphics, and systems workloads, CUDA debugging has become more challenging than ever. Current evaluations of LLM-based CUDA programming largely miss this setting: a model can pass correctness tests with repair by degeneration, simplifying the CUDA code into a safer but slower program that abandons the original optimization structure. We introduce CUDABEAVER, a benchmark for CUDA debugging from real failing workspaces produced during LLM-based CUDA generation. Each task provides the broken candidate, native build/test commands, raw error evidence, and a single editable file. CUDABEAVER evaluates whether a fixer truly repairs the failing CUDA code or merely finds a slower test-passing replacement, reporting results by failure category, debugging trajectory, stagnation mode, and performance preservation. We further propose pass@k(M,C,A), a protocol-conditional CUDA debugging metric by making the fixer M, corpus C, and protocol axes Aexplicit. Using this metric across 213 tasks and seven frontier LLMs, we show that protocol-aware evaluation gives a more faithful view of CUDA debugging ability: when performance-loss tolerance is high, fixers appear much stronger, but even a minor stricter performance requirement can sharply reduce measured success, shifting scores by up to 40 percentage points.

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

↑