arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.27396cs.SEcs.LG
收藏

张量程序测试输入生成:什么真正发现内核错误

Test-Input Generation for Tensor Programs: What Actually Finds Kernel Bugs

Arizona State University(亚利桑那州立大学)

Dipankar Sarkar

AI总结:

通过GPU模拟器模糊测试,比较七种测试生成策略在26个操作上的效果,发现边界形状采样在错误召回率(78%)和假阳性率(0%)上表现最佳。

摘要:

张量内核的测试输入生成是经验性的。大多数项目选择一个代表性的形状和数据类型,运行固定形状的allclose风格检查,然后发布。我们明确这些选择并对其进行测量。使用gpuemu操作模式感知的种子模糊器(arXiv:2606.20128),我们在RTX 3060 GPU实例上评估了七种测试生成策略,涵盖26个操作(16个正确控制和10个LLM风格的错误变体,这些变体植入了文档化的转录模式)。策略变化包括形状候选集、数据类型混合和输入值分布。我们报告每个策略在两个轴上的表现:错误召回率和控制假阳性率。边界形状采样是操作上安全的赢家:在10个错误内核上召回率为78%,在16个控制上假阳性率为0%。对抗性值采样达到更高的召回率(99%),但将控制假阳性率提升到94%,因为该策略注入NaN和Inf输入,验证器的NaN检查会在每个传播它们的内核上触发,而不仅仅是错误内核。在两个softmax尾部掩码错误上,“常规”策略(无边界形状)召回率为0%,而边界形状将召回率分别提高到100%和62%。这一差距是数据中最清晰的单一信号。语料库结果关于每个策略捕获哪些植入的错误模式,而不是任何特定部署LLM的错误率。

英文摘要:

Test-input generation for tensor kernels is folkloric. Most projects pick a representative shape and dtype, run a fixed-shape allclose-style check, and ship. We make the choices explicit and measure them. Using the gpuemu op-schema-aware seeded fuzzer (arXiv:2606.20128), we evaluate seven test-generation strategies across a 26-op corpus (16 correct controls and 10 LLM-style buggy variants seeded with documented transcription patterns) on an RTX 3060 GPU instance. Strategies vary the shape candidate set, the dtype mix, and the input value distribution. We report each strategy on two axes: bug recall and control false-positive (FP) rate. Boundary-only shape sampling is the operationally safe winner: 78% recall on the 10 buggy kernels with 0% FP on the 16 controls. Adversarial value sampling reaches higher recall (99%) but inflates control FP to 94% because the strategy injects NaN and Inf inputs and the validator's NaN check fires on every kernel that propagates them, not only on buggy kernels. On the two softmax tail-mask bugs the "regular" strategy (no boundary shapes) catches 0%, while boundary raises recall to 100% and 62% respectively. That gap is the clearest single signal in the data. The corpus result is about which seeded bug patterns each strategy catches, not about the bug rate of any specific deployed LLM.

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

↑