logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

AI is now capable of developing its own inference hardware

Original article
github.com|109 points|75 comments|by fsbonetto|Oct 6, 2026

AI-Driven Hardware: The Emergence of openTPU

Project Avatar

The boundary between software and hardware is blurring. openTPU represents a milestone where AI is no longer just the workload running on a chip, but the architect designing it. This project is an open-source AI accelerator created by AI agents, encompassing everything from the raw logic to the high-level compiler.

The Core Hypothesis:

  1. To what extent can AI agents master the complexities of hardware engineering?
  2. Is it possible for an AI to design the very silicon (or FPGA logic) required to execute its own inference?

🛠️ Project Scope & Architecture

The project is housed in a streamlined monorepo, allowing developers to trace the entire path from a high-level Python matrix multiplication down to the physical wires.

The openTPU Stack includes:

  • RTL: Hardware descriptions written in SystemVerilog.
  • ISA: A custom Instruction Set Architecture.
  • Simulator: A bit-exact software simulation environment.
  • Compiler: A dedicated kernel language and its associated compiler.
  • Host Software: Drivers to manage a physical PCIe card.
  • Profiler: Tools to analyze performance.

System Data Flow


🚀 Performance Benchmarks

The design was validated using an Inspur YPCB-00338 card, featuring a Xilinx Kintex-7 xc7k480t and dual DDR3 channels. The hardware output matches the simulator's results bit-for-bit\text{bit-for-bit}bit-for-bit.

Inference Results Table

Model WeightsDecode (Device)Decode (Wall)Prefill (Device)DRAM Bandwidth
LFM2.5-230M (int8)59.0 tok/s52.3 tok/s295.6 tok/s14.5 GB/s (85%)
LFM2.5-230M (4-bit, int8 head)85.8 tok/s82.1 tok/s335.4 tok/s14.1 GB/s (82%)
Qwen3-0.6B (int8)21.6 tok/s21.3 tok/s92.1 tok/s14.4 GB/s (84%)
Qwen3-0.6B (4-bit, int8 head)31.3 tok/s30.7 tok/s103.4 tok/s13.9 GB/s (82%)
Qwen3.5-0.8B (int8)17.6 tok/s16.3 tok/s61.4 tok/s14.5 GB/s (85%)
Qwen3.5-0.8B (4-bit, int8 head)24.5 tok/s23.3 tok/s66.7 tok/s14.1 GB/s (83%)
Gemma 4 E2B (4-bit, int8 head)10.57 tok/s10.53 tok/s32.1 tok/s15.6 GB/s (92%)
Gemma 4 E2B (4-bit, 4-bit head)12.14 tok/s12.09 tok/s29.9 tok/s15.5 GB/s (91%)
LFM2-2.6B (int8)6.05 tok/s6.03 tok/s21.4 tok/s16.1 GB/s (94%)
LFM2-2.6B (4-bit, int8 head)10.96 tok/s10.93 tok/s20.6 tok/s15.8 GB/s (93%)
SmolLM3-3B (int8)5.00 tok/s4.99 tok/s21.1 tok/s16.0 GB/s (94%)
SmolLM3-3B (4-bit, int8 head)8.74 tok/s8.72 tok/s22.8 tok/s15.7 GB/s (92%)
Phi-4-mini (3.8B) (int8)3.99 tok/s3.98 tok/s13.8 tok/s16.0 GB/s (94%)
Phi-4-mini (3.8B) (4-bit, int8 head)6.56 tok/s6.55 tok/s15.0 tok/s15.8 GB/s (92%)
Qwen3.5-2B (int8)8.02 tok/s8.00 tok/s38.2 tok/s16.0 GB/s (94%)
Qwen3.5-2B (4-bit, int8 head)12.09 tok/s12.03 tok/s41.7 tok/s15.8 GB/s (92%)
Qwen3.5-4B (4-bit, int8 head)5.88 tok/s5.87 tok/s12.9 tok/s15.7 GB/s (92%)
Gemma 4 E4B (int8, 4-bit head/down)3.78 tok/s3.75 tok/s14.8 tok/s16.0 GB/s (94%)

🔍 Technical Deep Dive

Hardware Implementation

The current production image runs at 133.33 MHz and utilizes a single bitstream for all supported models. Key components include:

  • LiteDRAM Controllers: These are calibrated by an internal CPU within the memory core, taking approximately 12 seconds upon startup without requiring host intervention.
  • Systolic Matrix Unit: A four-column design optimized for tensor operations.
  • Stream Engine: Detailed in docs/stream.md.

Measurement Methodology

Performance was measured using tools/qual/perf.py with the following parameters:

  • Prompt: 512 tokens.
  • Decode: 64 greedy tokens.
  • Logic: The host handles the argmax in the loop.

The distinction between timing metrics is as follows: Wall Time=Device Cycles+Host Overhead\text{Wall Time} = \text{Device Cycles} + \text{Host Overhead}Wall Time=Device Cycles+Host Overhead

Memory Management (Gemma 4)

The handling of embedding tables varies by model size:

  1. Gemma 4 E2B: Tables are stored on-card (≈3.5–3.6 GiB\approx 3.5\text{--}3.6\text{ GiB}≈3.5–3.6 GiB). Note: int8 is too large to fit.
  2. Gemma 4 E4B: Tables (≈2.95 GB\approx 2.95\text{ GB}≈2.95 GB) reside on the host; the host copies a single 11 KB11\text{ KB}11 KB row per token. The total image size is 3.96 GiB3.96\text{ GiB}3.96 GiB.

📈 Evolution & Iteration

The project has moved through several iterations to optimize DRAM utilization and speed.

se-cand3 →\rightarrow→ deploy_champ_e698dcd7 →\rightarrow→ deploy_fused133c_79c5707a (Build B)

Key Improvements in Build B:

  • Speed: 8-10% faster decoding for LFM2-2.6B, SmolLM3, Phi-4-mini, and Gemma 4 E2B.
  • Efficiency: DRAM utilization increased to 91–94%91\text{--}94\%91–94% (up from 82–87%82\text{--}87\%82–87%).

Compared to the older se-cand3 (which used the Xilinx MIG, a two-column matrix unit, and a 120.755 MHz clock), the new image's decode performance is within 2.3%2.3\%2.3% across all configurations, as decode is primarily bound by DRAM bandwidth.

Example Configuration Snippet

# Mock representation of a model config in openTPU
model_config = {
    "name": "LFM2-2.6B",
    "precision": "int4",
    "head_precision": "int8",
    "clock_speed": "133.33MHz",
    "dram_peak_util": 0.94
}

For further details on board specifications, refer to docs/board.md (Section 5).