← Latest papers
🤖 machine learning

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

KForge is a cross-platform framework that leverages two collaborating LLM agents to iteratively generate and refine high-performance kernels for AI accelerators, achieving significant throughput improvements on both NVIDIA B200 and Intel Arc B580 hardware compared to existing hand-tuned and compiler-optimized baselines.

Original authors: Taras Sereda, Burak Bartan, Ankita Nayak, Tom St. John, Natalie Serrino, Zain Asgar

Published 2026-06-03
📖 4 min read☕ Coffee break read

Original authors: Taras Sereda, Burak Bartan, Ankita Nayak, Tom St. John, Natalie Serrino, Zain Asgar

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a massive, high-speed delivery service. Your fleet isn't just one type of truck; it's a mix of tiny scooters for city streets, heavy-duty semis for highways, and electric vans for eco-zones. Each vehicle is perfect for a specific job, but they all speak different languages and have different engine rules.

In the world of Artificial Intelligence (AI), this is exactly what happens today. AI systems are becoming "agentic," meaning they don't just answer a question; they break tasks down into steps, use tools, and coordinate with other AI agents. Some steps need heavy math (like a semi-truck), while others need quick, light thinking (like a scooter). To make the whole system fast, you need to run each step on the specific computer chip (accelerator) best suited for it.

The Problem: The Translation Nightmare
The catch is that writing the "engine code" (called kernels) for these different chips is incredibly hard. It's like trying to write a manual for a Ferrari, a tractor, and a motorcycle all at once, but the manuals are written in different languages (CUDA, Metal, SYCL, etc.).

  • The Old Way: Human experts spend years hand-writing and tweaking this code. It's slow, expensive, and hard to scale.
  • The New Problem: Even when we try to use AI to write this code, it often fails. The AI might write code that looks right but crashes the engine, or it might write code that works on a NVIDIA chip but fails completely on an Intel chip.

The Solution: KForge (The AI Mechanic Team)
The paper introduces KForge, a new system that acts like a team of two specialized AI mechanics working together to fix and optimize these engines automatically.

Instead of one AI trying to do everything, KForge splits the job:

  1. The Generator (The Builder): This AI writes the code. If the code crashes or doesn't compile, it gets a "red light" and tries again, fixing the errors.
  2. The Analyst (The Tuner): Once the code works, this AI looks at the "dashboard" (profiling data). It sees things like "this engine is wasting fuel" or "the wheels are spinning too fast." It gives the Builder specific instructions on how to tweak the code to make it faster.

They work in a loop: Build → Test → Analyze → Tweak → Repeat. This continues until the code is not only correct but also blazing fast.

The Results: Two Different Races
The authors tested KForge in two very different scenarios to see how well it works:

  • Race 1: The Heavyweight Champion (NVIDIA B200)
    Here, KForge had to compete against a codebase that had been perfected by NVIDIA engineers over many years (TensorRT-LLM). It was like a rookie mechanic trying to beat a Formula 1 team's pit crew.

    • The Result: KForge managed to squeeze out a 2.12% speed increase. In the world of high-performance computing, beating a champion by even 1% is a huge deal. It's like shaving a split-second off a world-record lap time.
  • Race 2: The New Track (Intel Arc B580)
    Here, there was no "champion" to beat. The hardware was new, and there was no existing high-performance code to copy. KForge had to build the engine from scratch.

    • The Result: KForge generated code that was 5.13 times faster than the standard, unoptimized code currently available for this chip. It essentially brought a new, powerful engine to life where there was previously only a slow, basic one.

Why This Matters
The paper argues that as AI gets more complex, we can't rely on humans to manually write code for every new chip. KForge shows that an AI team can:

  • Translate code across different hardware brands (NVIDIA, Intel, Apple, AMD).
  • Fix its own mistakes.
  • Learn from performance data to get faster over time.

In short, KForge is a tool that helps AI systems run efficiently on any computer chip, whether that chip is a well-tuned veteran or a brand-new model, by automating the difficult work of writing the low-level engine code.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →