arXiv:2608.02712cs.SEcs.AI2026-08

用调试代替重生成,让硬件算子修复更高效准确

Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Hardware Operators

  • 构建专用调试智能体,基于失败模式和诊断信息定位问题
  • 修复成功率66.7%,比三轮重生成高26个百分点,耗能仅1/12
  • 适合需要高可靠、低资源消耗的硬件加速器开发团队

GPU与NPU等硬件加速器的内核生成已成为大语言模型(LLM)的重要应用场景。当前先进系统通过耦合LLM、代理强化学习与进化搜索的流水线生成候选内核,编译执行大量方案后舍弃多数结果,未能将失败案例转化为可复用知识。许多被丢弃的候选为近似正确算子——虽能编译运行但数值验证失败,蕴含真实领域知识且耗费大量LLM推理、交叉编译与硬件执行资源。本文主张范式转变:不重生成,而应调试。调试空间小、反馈密集,效率更高。提出专用调试智能体,解决三大挑战:通过检索模式与诊断工具缓解知识稀缺;通过反作弊检测与全覆盖率评估保障完整性;通过收敛控制与迭代上限降低开销。调试实现双重价值:扩展能力边界,恢复重复生成无法产出的算子;降低单位产出成本。Debug Pass@1达66.7%,显著优于Regenerate Avg Pass@1的25.9%及Regenerate Pass@3的40.7%;每成功一次仅消耗三轮重生成1/12的token。消融实验表明知识库驱动修复,完整性机制剔除12.5%-33.3%原工作流接受的虚假成功。

原文摘要 · Abstract (English)

Kernel generation for hardware accelerators such as GPUs and NPUs has become a proving ground for large language models (LLMs), and state-of-the-art systems raise correctness through pipelines that couple LLMs with agentic reinforcement learning and evolutionary search. Such pipelines generate, compile, and execute large numbers of candidate kernels, discarding most of them and forgoing the opportunity to distill failures into reusable knowledge. Many discarded candidates are near-miss operators that compile and run but fail numerical validation; each embodies genuine domain knowledge and a nontrivial investment in LLM inference, cross-compilation, and hardware execution. We argue for a paradigm shift: rather than regenerate, debug. Debugging is far more constrained than generating from scratch: the search space is small and feedback is dense. We present a domain-specific debug agent that addresses three core challenges in autonomous repair: mitigating knowledge scarcity through retrieved patterns and diagnostic instrumentation, ensuring integrity through anti-cheat detection and full-coverage evaluation, and controlling cost via convergence guards and bounded iteration. Debugging serves two complementary roles: it extends the capability frontier by recovering operators that repeated regeneration fails to produce, and it lowers cost per deliverable operator. Debug Pass@1 achieves 66.7% versus Regenerate Avg Pass@1's 25.9% and Regenerate Pass@3's 40.7%, while consuming 92.8% fewer tokens per success than three-trial regeneration. Component ablations show that the knowledge base drives recovery, while integrity gates reject 12.5-33.3% of the successes the workflow itself accepted.

硬件生成智能体调试优化

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