# Auto-Architecture: An Autonomous Loop Optimizes a RISC-V CPU 92% in 9 Hours

> Karpathy's autoresearch idea, but the optimization target is a CPU's RTL instead of a neural net.

- Org: FeSens
- Date: 2026-04-29
- Category: showcase, repo
- Source: https://github.com/FeSens/auto-arch-tournament
- Canonical page: https://ai-tldr.dev/releases/fesens-auto-arch-tournament/

## In short

A solo Show HN points Karpathy's autoresearch loop at SystemVerilog. An LLM proposes microarchitectural hypotheses for a 5-stage RV32IM core; a verifier runs formal checks, simulation and FPGA synthesis; only changes that improve CoreMark/MHz get merged.

## What it is

An open experiment by FeSens that points a coding-agent research loop at a textbook 5-stage in-order RV32IM SystemVerilog core. The agent proposes microarchitectural hypotheses (forwarding tweaks, branch-predictor changes, pipeline tweaks) as YAML, schema-checked against a hypothesis schema, and only accepted ones become commits.

## How it works

Each round, an LLM (Claude or Codex) drafts a hypothesis and an implementation in an isolated worktree. A verifier stack runs riscv-formal proofs, Verilator simulation, and yosys/nextpnr FPGA synthesis to check correctness, frequency and area. CoreMark iterations per second per MHz is the fitness signal. Hypotheses that pass formal verification AND raise CoreMark/MHz get merged; the rest are rejected.

## Why it matters

Most autoresearch demos so far have stayed inside Python and gradient descent. This is a concrete public example of the same loop applied to RTL — a domain where the verifier is hard but exists. The author's takeaway, echoed across HN comments: the frontier isn't the loop, it's the verifier you can plug into it.

## Who it's for

hardware engineers experimenting with AI agents, autoresearch hobbyists, anyone curious how Karpathy's recipe generalizes outside ML.

## Try it

git clone https://github.com/FeSens/auto-arch-tournament

## Links

- [GitHub Repo](https://github.com/FeSens/auto-arch-tournament)
- [Blog Post](https://github.com/FeSens/auto-arch-tournament/blob/main/docs/auto-arch-tournament-blog-post.md)
- [Show HN](https://news.ycombinator.com/item?id=47937380)
- [Karpathy's autoresearch](https://github.com/karpathy/autoresearch)
