Introducing Frostbite: A new CPU architecture discovered, designed, and verified end-to-end by AI
Pangram verdict · v3.3
We believe that this text is a mix of AI and human-written content.
AI likelihood · overall
MixedArticle text · 1,448 words · 20 segments analyzed
AbstractIn our previous post, Redwood, we showed that given an architecture, our AI systems could implement, verify, and deploy an inference accelerator in record time. However, similar to other scientific domains, we believe that AI systems, given the correct freedom and guardrails, can co-design software and hardware together, making optimizations across the stack and opening a design space so large it was previously inaccessible. We set out to answer the question: “Could our AI systems & tools lead to a novel hardware discovery that radically outperforms human-made designs?”Today, we're introducing Frostbite, a general-purpose CPU with a new instruction set built from the ground up. Frostbite exploits the properties of interaction nets, namely that every step is local, every dependency is explicit, and every value has exactly one owner, to reach a step-function gain in CPU performance that has long stagnated. On a set of 25 initially chosen workloads, including 15 held out until the final evaluation, we achieved a 4.59x performance-per-watt multiple when compared to a modern, silicon-proven superscalar (dual-issue, in-order) CPU core.Our AI systems autonomously iterated over the compiler, ISA, architecture, microarchitecture, RTL, verification, and final GDS. When we took a closer look at the discovered architectural primitives, we were surprised to find novel hardware implementations and runtime features that would have otherwise been difficult to architect. In spite of stagnation in CPU core improvement, we were able to take a workload concept all the way to a final GDS, and prove a step-function increase in perf/W and perf/area. We believe that as AI systems become more capable, every class of chip we know today, from datacenter-grade CPUs, to AI accelerators, to networking switches and NICs, will go through similar fundamental architectural shifts.Introduction to interaction netsMainstream programming languages, when compiled for general-purpose CPUs, hide the dependencies between the parts of a program.
Any piece of code may read or write any variable through a shared, mutable state, and so modern CPU hardware assumes the worst case and rediscovers, at runtime, which instructions actually depend on each other.
Moreover, single-core CPU performance has largely stalled since the early 2000s, pushing people towards large multicore CPUs such as Intel Xeon, AMD Zen, and NVIDIA Vera.
This forces CPUs to maintain the illusion that every core sees the same memory, and keeping that illusion consistent and performant requires deep cache hierarchies and coherence protocols that cost area and power, and scale poorly.Interaction nets1 take a different approach. A program is a graph of nodes, and computation happens by rewriting pairs of nodes that are connected through their ports. Every rewrite only touches a small, local part of the graph. Because each node has exactly one principal port, no two of these active pairs ever overlap, so they can be rewritten in any order, or all at once, and the result is always the same. Interaction nets are also linear: every value is used exactly once, so there is no shared mutable state for the hardware to guard.
Languages such as Vine2compile ordinary-looking programs directly to interaction nets.
For an excellent introduction to interaction nets and why they suit hardware, we highly recommend Tendrils' “On Interaction Nets.” 3Fig.
1.
Five queens, two ways.
On the left, a C++ program walks the search tree one step at a time. On the right, the same search as an interaction net explores many branches at once: 3,183 interactions with a critical path of only 262 steps.Fig. 1 shows the difference on a small search problem, placing five queens on a five-by-five board. The sequential program visits one candidate at a time. The interaction net exposes all of its independent work: on average, about twelve interactions are ready to run at every step.
Nothing about the program was rewritten to get this parallelism; the dependencies were simply never thrown away.In theory, this should have two large advantages.
The first is multithreading for free: rather than varying levels of coarse and fine-grained parallelism, parallelism comes straight from the program.
No threads, locks, or race conditions, and none of the out-of-order machinery a conventional core uses to dig it back out.
The second is that, since every value has one owner and every step is local, data can live in small local memories next to where it is used.
That removes much of the area and power a conventional chip spends on large caching subsystems, and much of the system-level complexity of keeping those caches coherent.ProcessFrostbite was designed with zero architectural priors.
We followed the process below, riding multiple agent swarms along the way.Fig.
2.
The Frostbite program from first proposal to ablations: key events, the stages of work, and the worktrees the agents created, with each branch drawn in its phase's color.Architecture exploration and selectionTo begin architectural exploration, we had to establish the set of workloads Frostbite should do exceedingly well in. We decided to look at different ways a program could expose its work: many independent pieces at once, rounds of parallel work, long sequential chains, data-dependent branches, and recursion. Under each category, we created a search set and a held-out eval set to evaluate the final Frostbite on, ensuring the design generalized to programs it was never tuned on. The kernels for FFT, radixsort, and LU follow the implementation in the SPLASH-2 benchmark, although 64 times smaller, because at regular sizes they are not suitable for exploratory work.Later, we added five more practical workloads to the held-out set: a Kalman filter, PCA, finite element analysis, an LU solve, and LZ4 decompression.Fig.
3.
All 25 workloads, grouped by how each program exposes its work, and split into the search set the agents tuned on and the held-out eval set, with the size each was run at.Agents synthesized research papers and existing benchmarks, and built Python models to trade off high-level architectural ideas against each other, before narrowing to a single architectural concept. The output of this exploration was a 141-page PDF covering the proposed programming model, the runtime, and the high-level blocks of the chip. This was nowhere near the final architecture, but rather a starting point where all the prior findings, high-level requirements, constraints, experiments, and runtime traits were described. Once the first architectural iteration completed (first RTL generation), this was deleted, since many of the numbers and estimates were well off what was physically possible.Formal contracts and system modelingOnce the architecture candidate was selected, our system moved on to building the full software model of the chip. Building software models is essential when exploring an architectural space, as they allow fast iteration between the workloads, the ISA, and the abstracted view of the hardware. Whether we build a CPU, GPU, NPU, or networking switch, mastering this iteration loop allows the fastest exploration of the design space within a finite time. To do this repeatedly, we designed a new in-house specification language, ASL, and wrote Frostbite's system model “Arcmodel” in it. ASL supports machine-checkable translations and refinements between RTL, system models, UVM, SVA, and more, all against a formally backed specification. Its power and performance estimates are accurate to within 1–5%, it runs roughly 200x faster than RTL simulation, and it is formally verifiable through “contracts.” In every silicon program to date, human architects have written many English PDFs before handing off to an implementation team and a verification team. However, natural language cannot capture every detail an implementation needs precisely and unambiguously, and it cannot guarantee that every agent hallucination is caught while the ASIC is being designed and verified. Natural language was never built for this, and in a world where AI writes the specification, we opt for a formal, machine-checkable specification language instead.ASL can formally describe both high-level, protocol-like behavior, such as out-of-order handling, CSR programming, memory ordering, and coherency, and low-level details, such as pipelines, arbitration mechanisms, and compute transfer functions. This lets the model leave the specification open-ended where that is useful and constrain it exactly where a precise behavior is required. ASL also translates natively to Lean,4 which we use for all theorem proving when checking AI outputs across RTL, UVM, C, SVA, and more. We will discuss ASL in more detail in a future post.Throughout the entire development of Frostbite, our AI iterates on the Frostbite ISA, Arcmodel, Design, and Verification tightly together, maintaining the ASL Contract as the source of truth. We've found that having a single, provable source of truth prevents a large class of bugs, silly mistakes, and reward-hacking instances when deploying large agent swarms. Ultimately, this common language allows the models to work across the stack nimbly, reflecting the changes propagated from the workload down to the final hardware. By the end, our Frostbite ASL lowered down to 800k+ lines of Lean.Fig.
4.