arXiv

KForge: LLM-Driven Cross-Platform Kernel Generation for AI Accelerators

Title: KForge: Utilizing LLMs for Cross-Platform Kernel Generation in AI Accelerators

Abstract:

As production inference increasingly relies on a diverse array of accelerators, agentic pipelines have emerged that interleave reasoning, tool invocation, and multi-agent coordination. Because each of these stages exhibits unique compute and memory requirements, optimal efficiency dictates that they execute on the hardware best tailored to their specific profiles. This necessity introduces a significant systems engineering challenge: modern pipelines demand high-performance kernels across an expanding landscape of hardware backends and programming paradigms. Traditionally, hand-crafting these kernels has been a labor-intensive process requiring profound low-level expertise, a method that fails to scale as kernel complexity increases.

While recent efforts have employed Large Language Models (LLMs) for automatic kernel generation, the field continues to struggle with the intricacies of low-level code production and generalization across different backends. To address these limitations, we introduce KForge, a cross-platform framework centered on an iterative refinement loop facilitated by two cooperating LLM-based agents. The first, a generation agent, produces kernels and progressively enhances them using feedback from compilation processes and correctness checks. The second, a performance-analysis agent, interprets profiling data—sourced from both programmatic APIs and GUI-based tools—to issue recommendations that guide subsequent synthesis rounds.

This iterative process alternates between functional passes, which ensure candidate kernels achieve correctness, and optimization passes, designed to narrow the performance gap relative to hand-tuned baselines. We validated KForge on two distinct backends with varying levels of baseline reference availability. On the NVIDIA B200, the framework delivered a 2.12% improvement in end-to-end throughput over TensorRT-LLM when benchmarked on the gpt-oss-20b inference speed test. Meanwhile, on the Intel Arc B580, KForge generated Triton kernels that achieved a 5.13x geometric mean speedup compared to the faster of PyTorch eager execution or torch.compile. This performance gain was realized across 37 GEMM and tail-operations workloads from KernelBench Level 2, primarily through the implementation of operator fusion and mixed-precision execution.


Source: arXiv Generated at: 2026-06-03 00:00:00 UTC

Related Articles

TikTok Billionaire Tops Ambani as Asia’s Second-Richest
Bloomberg

TikTok Billionaire Tops Ambani as Asia’s Second-Richest

TikTok founder surpasses Mukesh Ambani to become Asia’s second-richest person, marking a significant shift in the region...

Publishers in UK can opt out of Google AI search results
BBC News

Publishers in UK can opt out of Google AI search results

UK publishers can now opt out of Google’s AI search summaries, a CMA ruling designed to boost their bargaining power and...

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.
Bloomberg

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.

Kioxia’s market cap nears Toyota’s, signaling a major shift in Japan’s corporate hierarchy. This narrowing gap highlight...

Reuters

Morning Bid: Marvell, a fitting name for the latest AI darling

Reuters highlights Marvell as a top AI stock, noting its name perfectly suits its status as the newest market darling.

Financial Times

Tim Hayward: I built the Jaguar E-Type of computer keyboards

Tim Hayward compares his bespoke keyboard designs to the Jaguar E-Type. He explores high-end customization for personal ...

Financial Times

AI Labs: Zuckerberg’s $100bn gamble

Meta’s $100 billion AI investment aims to secure AI dominance, but questions remain whether sheer spending can outpace c...