Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Project Summary

**Agentic Kernel Generation** is an LLM-agent system that writes, verifies,
and evolves Triton GPU kernels for LLM-inference operators — with a benchmark
harness designed so the reported speedups can't be faked.

## The idea

An LLM generates a Triton kernel. A sandboxed harness checks it against a
PyTorch reference on unseen random inputs and profiles it. A reflection agent
turns the profile into the next optimization, and an evolutionary controller
breeds the best kernels across generations.

## What makes it different

- **Reward-hack-proof measurement.** Correctness is a hard gate, the kernel
never sees the reference output, and every timed iteration uses fresh inputs.
- **Learns from its own failures.** A knowledge base distilled from 1,000+ real
Triton errors feeds verified fixes back into the refine loop.

## Results

Runs on a single 8 GB laptop GPU (RTX 3070, Ampere). Highlights vs PyTorch eager:
sliding-window attention 174.7×, W4A16 matmul 24.5×, flash attention 11.5× —
and ahead of PyTorch's own fused kernels (FlexAttention 1.48×, SDPA 1.17×) on
selected workloads.

## Structure

Two nested loops: an inner loop that refines one candidate serially
(evaluate → reflect → refine), and an outer evolutionary loop that selects
parents from a MAP-Elites archive and breeds offspring by mutation or crossover.
Fitness is speedup, hard-gated to zero unless the kernel is correct.

See the [README](README.md) for full results, methodology, and quickstart.
Loading