arXiv:2606.27396cs.SEcs.LG2026-06被引 2

对比七种测试输入生成策略,发现边界形状采样最有效且无误报。

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

论文配图:Test-Input Generation for Tensor Programs: What Actually Finds Kernel Bugs
图 1 · 摘自论文原文
  • 用种子模糊测试比较不同形状、数据类型和值分布的生成策略。
  • 边界形状采样达78%漏洞召回率且控制用例0%误报,优于其他策略。
  • 适合关注高召回率且零误报的张量程序测试人员参考。

张量核的测试输入生成长期依赖经验法则。多数项目采用固定形状和数据类型,进行简单的全等检查后直接发布。本文显式化这些选择并进行量化评估。基于gpuemu的感知操作模式种子模糊器(arXiv:2606.20128),我们在RTX 3060 GPU上对26个操作组成的语料库(16个正确控制用例与10个由已知转录模式生成的LLM风格错误变体)测试了七种测试生成策略。策略在形状候选集、数据类型组合和输入值分布上有所差异。评估维度为漏洞召回率和控制用例的误报率。仅采样边界形状的策略表现最优:在10个错误内核上实现78%召回率,且16个控制用例无误报。对抗性值采样虽达99%召回率,但将控制误报率推至94%,因其引入了NaN和Inf输入,而验证器对所有传播这些值的核均触发告警,不仅限于错误核。对于两个softmax尾部掩码错误,常规策略(不包含边界形状)召回率为0%,而边界采样分别提升至100%和62%。这一差距是数据中最为明确的信号。语料结果反映各策略对特定种子错误模式的覆盖能力,而非任何部署的LLM的实际漏洞率。

原文摘要 · Abstract (English)

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.

测试生成张量核模糊测试

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