EGG: An Expert-Guided Agent Framework for Kernel Generation
EGG addresses the problem of automating high-performance GPU kernel generation for LLMs, which currently requires manual expert tuning. The method decomposes kernel generation into two hierarchical stages—algorithmic structure design and hardware-specific tuning—guided by expert optimization principles and a stage-aware multi-agent collaboration mechanism. Experimental results on KernelBench and real-world workloads demonstrate a 2.13x average speedup over PyTorch, outperforming existing agent-based and RL-based approaches. This matters because it significantly reduces the reliance on manual optimization, enabling scalable and efficient kernel generation to combat the growing computational costs of LLMs.