GPT-56T 861 —
MUSE-SPK 837 +0.2%
GPT-56SC 790 -4.6%
GLM-5 781 -0.4%
CL-OP55X 780 -5.1%
GROK-46H 780 -5.1%
QWEN-38X 748 -9.2%
GPT-6A 743 -9.4%
KIMI-K3X 742 —
CL-FAB5H 698 -6.1%
CL-OP5H 675 -6.2%
GEM-38FH 672 -0.7%
CL-OP5X 670 -5.5%
CL-OP55H 668 —
CL-OP46H 657 -5.9%
CL-OP47H 648 -6.1%
GPT-56S 618 -0.6%
GEM-37FH 610 -7.2%
GEM-36FH 593 —
CL-OP48H 588 —
CL-OP47 581 -0.2%
GEM-35FH 580 —
GPT-55H 541 -7%
INKL 531 —
GEM-31P 512 -0.2%
CL-OP46 498 +0.4%
GEM-3P 498 -0.2%
CL-OP48 492 +0.4%
GPT-52 464 —
GPT-55 423 —
GPT-56T 861 —
MUSE-SPK 837 +0.2%
GPT-56SC 790 -4.6%
GLM-5 781 -0.4%
CL-OP55X 780 -5.1%
GROK-46H 780 -5.1%
QWEN-38X 748 -9.2%
GPT-6A 743 -9.4%
KIMI-K3X 742 —
CL-FAB5H 698 -6.1%
CL-OP5H 675 -6.2%
GEM-38FH 672 -0.7%
CL-OP5X 670 -5.5%
CL-OP55H 668 —
CL-OP46H 657 -5.9%
CL-OP47H 648 -6.1%
GPT-56S 618 -0.6%
GEM-37FH 610 -7.2%
GEM-36FH 593 —
CL-OP48H 588 —
CL-OP47 581 -0.2%
GEM-35FH 580 —
GPT-55H 541 -7%
INKL 531 —
GEM-31P 512 -0.2%
CL-OP46 498 +0.4%
GEM-3P 498 -0.2%
CL-OP48 492 +0.4%
GPT-52 464 —
GPT-55 423 —
← Back to feed

AI Agent Finds 10 CPU Optimizations in 10 Hours, Beats Human-Tuned VexRiscv by 56%

Andrej Karpathy’s autoresearch pattern — propose, implement, measure, keep the wins — has been applied primarily to software: optimizing training loops, refining prompts, tuning gradient descent. Developer FeSens asked whether it generalises to a domain with a much harder feedback loop: CPU microarchitecture design.

The answer, published as auto-arch-tournament and picked up by IEEE Spectrum, is yes — with an important caveat about where the real work is.

Setup

The baseline is a textbook 5-stage in-order RV32IM pipeline in SystemVerilog: IF/ID/EX/MEM/WB, no branch predictor, no caches, no multi-issue. Locked at 2.23 CoreMark/MHz, 301 iter/s — the same methodology VexRiscv uses for its published benchmarks.

Each round, three agent slots run in parallel. An LLM proposes a microarchitectural hypothesis as structured YAML, a second LLM implements it in the rtl/ directory inside an isolated git worktree, and then a deterministic eval gate fires:

  • riscv-formal: 53 symbolic BMC checks covering decode, traps, ordering, liveness, and M-extension correctness
  • Verilator cosim: byte-identical RVFI trace against a Python ISS under ~22% random bus stalls
  • nextpnr place-and-route: 3-seed median Fmax on a Gowin GW2A-LV18 FPGA (Tang Nano 20K)
  • CoreMark CRC validation: the same 4 CRC values VexRiscv reports

Improvement merges. Regression or failure destroys the worktree. A diversity rotation forces each slot into a different category (micro_opt / structural / predictor / memory / extension) to prevent fixation.

Results

73 hypotheses. 10 accepted. 50 regressions. 9 formal or cosim failures. 4 placement failures. 9 hours 51 minutes wall-clock.

End state: 2.91 CoreMark/MHz, 577 iter/s, 199 MHz Fmax, 5,944 LUT4.

That is +91.9% CoreMark over the locked baseline. Compared against the human-optimised VexRiscv reference (2.57 CoreMark/MHz at 144 MHz), it lands +56% on CoreMark iter/sec (578 vs 370) and uses 40% fewer LUTs.

The step-function crosses the VexRiscv line at iteration 6 and stays above it. The gap between VexRiscv’s full no cache and linux balanced configurations — their next tier, with caches — is about 40 percentage points; the loop covered 13 of those in under 10 hours on a single FPGA target.

The 10 accepted optimisations, in order:

CoreMark/MHzFmaxHypothesis
2.32135 MHzBackward-Branch Taken Predictor
2.35138 MHzIF Direct-Jump Predictor
2.35160 MHzCold Multi-Cycle DIV/REM Unit
2.37168 MHzOne-Deep Store Retirement Slot
2.37179 MHzSegmented RVFI Order Counter
2.89164 MHzRegistered Lookahead I-Fetch Replay Predictor
2.89175 MHzCompressed Resetless I-Fetch Replay Tags
2.89183 MHzRTL-Only Hot/Cold ALU Opcode Split
2.91199 MHzBanked Registered I-Fetch Replay Predictor

The biggest single jump — moving DIV/REM off the single-cycle ALU path at iteration 3 — also halved the LUT count as a side effect. The agent did not know that would happen. It found out by doing it and watching the synthesiser.

The Actual Thesis

The project’s central argument is not about the loop. It is about the verifier.

Of 73 hypotheses, 63 were wrong. Several examples from the log illustrate why the eval gate is load-bearing:

The same DIV/REM idea arrived at round 1 as Move DIV/REM off the single-cycle ALU path and broke cosim before ever reaching the FPGA. Two hours later, the agent resubmitted it as Cold Multi-Cycle DIV/REM Unit — same idea, fixed implementation — and it became the breakthrough win. Without the cosim gate, the broken version would have shipped.

At round 24, after the peak of 577 iter/s was already locked, the agent proposed Registered Lookahead JALR Target Predictor. Fitness collapsed to 154 iter/s — a 73% regression. The comparison-against-baseline check caught it before it merged.

Two separate hypotheses attempted to write files outside the allowed rtl/** path. The path sandbox rejected both before any code was generated.

The conclusion: the agent loop is a commoditised component. Six months of moat at best. The formal verifier, the cosim harness, the schema validation, the budget check — those are the parts that make the loop safe to run unattended. Without them, the agent fixes one bug by introducing three.

What This Means for Hardware Design

The significance is domain transfer, not benchmark numbers. AI agents have become routine in software: SWE-bench Verified scores above 80% are now table stakes at the frontier. Hardware design involves a fundamentally different feedback cycle — synthesis, place-and-route, timing closure, formal property verification — and it has historically been insulated from this class of automation.

Auto-arch-tournament demonstrates that a general-purpose LLM, with no hardware-specific fine-tuning and no domain-specific training data beyond the SystemVerilog files in the repo, can navigate that feedback cycle autonomously and improve on a carefully hand-tuned baseline. The loop is the same. The verifier is the hard part.