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

📅 2026-08-03
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing hardware operator generation methods discard “near-miss” candidates outright upon numerical validation failure, squandering valuable domain knowledge and computational resources. This work proposes a paradigm shift—replacing regeneration with debugging—and introduces, for the first time, a domain-specific debugging agent capable of autonomously repairing near-miss operators. The approach is realized through a repair framework that integrates retrieval-augmented reasoning, diagnostic instrumentation, anti-cheating detection, exhaustive evaluation, convergence guards, and bounded iteration, ensuring completeness while controlling computational cost. Experimental results demonstrate a Debug Pass@1 of 66.7%, substantially outperforming regeneration-based baselines (Pass@1: 25.9%; Pass@3: 40.7%) and reducing token consumption per successful repair by 92.8%.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

hardware operators
near-miss
debugging
kernel generation
numerical validation
Innovation

Methods, ideas, or system contributions that make the work stand out.

debug agent
near-miss operators
hardware kernel repair
domain-specific reasoning
cost-efficient LLM inference