Generating low-level kernels for hardware accelerators has become a common stress test for large language models. But even state-of-the-art LLM pipelines often produce kernels that are almost correct, failing on a single edge case or a subtle memory access pattern. A new arXiv preprint argues that the standard fix—regenerating the kernel from scratch—is the wrong instinct.
The paper, titled "Don't Regenerate, Debug," introduces a domain-specific agent designed to repair these near-miss kernels. Rather than looping back to the LLM for a fresh attempt, the agent inspects the faulty kernel, identifies the specific defect, and applies a targeted patch. The approach treats the original output as a strong prior rather than a failure.
The authors position this as part of a broader shift toward agentic pipelines that couple LLMs with verification and repair tools. The abstract notes that such pipelines are already raising correctness in accelerator kernel generation, and the new agent extends that trend by making debugging the central step. The source is a single arXiv paper, so the claims are preliminary and have not yet been peer-reviewed.