AI/ ai · gpu-optimization · dev-tools · llm-inference

New Framework Helps AI Agents Write Fast GPU Code

Ave adds compiler-level guardrails so coding agents stop guessing why their GPU kernels are slow, closing most of the gap with hand-tuned libraries.

AI coding agents can write GPU kernels that work, but not ones that fly.

A new framework called Ave gives those agents a way to check their own optimization ideas before running anything. AI models can already generate correct GPU kernels, but they routinely miss the low-level tricks - shared-memory staging, software pipelining, instruction scheduling - that hand-written expert libraries use to hit full speed. Ave uses a Python-like language where code carries tags describing how data is supposed to flow, then an SMT solver checks those tags against the rules and hands back a concrete counterexample when a proposed change would break something. A planner proposes optimizations from a curated playbook, and a separate agent writes the actual code.

Tested on AMD's MI300X chips on matrix multiplication, flash attention, and mixture-of-experts routing - the three kernel types that eat up to 90% of GPU time during LLM inference - Ave-optimized kernels hit 89 to 99% of the throughput of hand-tuned vendor libraries. That beat unguided agentic baselines by anywhere from 1.62x to 1176x, a spread wide enough to suggest some of those baselines were not just slow but broken.

Closing the last few points against libraries AMD's own engineers spent years tuning is a real result, not a marketing number. But a 1176x speedup mostly tells you the starting point was a kernel that barely worked at all.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →