KForge: A Multi-Agent System for Cross-Platform Kernel Synthesis
Taras Sereda ⋅ Burak Bartan ⋅ Ankita Nayak ⋅ Tom St. John ⋅ Natalie Serrino ⋅ Zain Asgar
Abstract
Large Language Models (LLMs) have demonstrated strong code generation capabilities, but most work focuses on high-level languages. Generating low-level performance code, such as GPU kernels, presents distinct challenges: kernels must be functionally correct, performant under tight resource constraints, and tuned to specific hardware capabilities across multiple programming models. We present KForge, a multi-agent LLM system for cross-platform kernel synthesis. KForge employs two collaborating agents: a generation agent that produces and progressively refines kernels using compilation and correctness feedback, and a performance-analysis agent that interprets multi-modal profiling data and emits recommendations that steer the next round of synthesis. The loop alternates between functional passes that drive the generated code toward correctness and optimization passes that close the performance gap to hand-tuned baselines. KForge supports four accelerator vendors (NVIDIA, AMD, Apple, Intel) and six programming models (CUDA, Triton, CuTe DSL, HIP, SYCL, Metal). On NVIDIA B200, KForge achieves a 2.12\% throughput improvement over NVIDIA's TensorRT-LLM on gpt-oss-20b inference.On Intel Arc B580, where hand-tuned references are unavailable, KForge generates Triton kernels achieving a 5.13$\times$ geometric mean speedup over the faster of PyTorch eager and \texttt{torch.compile} on 37 GEMM + tail-ops workloads in KernelBench Level 2.
Chat is not available.
Successful Page Load