From LLM to Silicon: RL-Driven ASIC Architecture Exploration for On-Device AI Inference
Organizations: XgenSilicon Inc.
Abstract
We present an RL-driven compiler that jointly optimizes ASIC architecture, memory hierarchy, and workload partitioning for AI inference across 3nm to 28nm. The design space is formulated as a single Markov Decision Process with mixed discrete-continuous actions and a unified Power-Performance-Area (PPA) objective. Soft Actor-Critic (SAC) with Mixture-of-Experts gating explores the joint space of mesh topology, per-core microarchitecture, and operator placement. We validate on two workloads, Llama 3.1 8B FP16 (high-performance mode, 29809 tokens per second at 3nm) and SmolVLM (low-power mode, less than 13 mW at all nodes, 10 MHz). Across 7 process nodes, the RL automatically adapts mesh sizes and per-tile configurations, including heterogeneous FETCH, VLEN, and memory allocation without node-specific manual retuning.
Figures & tables
| Compiler Stack | Optimization Features | Differentiating Capabilities | ||||||||||
| System | Frontend/IR | Graph Opt. | Backend/Codegen | RL/AutoTune | Quantization | Memory Plan | PPA Model | Target | Joint HW+SW | Multi-Core | Op-Level Part. | Node Retarget |
| TVM [ 1 ] | ✓ | ✓ | ✓ | ✓ | ✓ | × | × | CPU/GPU | × | × | × | × |
| Ansor [ 23 ] | ✓ | ✓ | ✓ | ✓ | × | × | × | CPU/GPU | × | × | × | × |
| XLA [ 3 ] | ✓ | ✓ | ✓ | × | ✓ | ✓ | × | TPU/GPU | × | ✓ | × | × |
| MLIR [ 2 ] | ✓ | ✓ | ✓ | × | × | × | × | Multi | × | × | × | × |
| Glow [ 4 ] | ✓ | ✓ | ✓ | × | ✓ | ✓ | × | CPU/Accel | × | × | × | × |
| Category | Idx Range | Dims | Representative Features |
|---|---|---|---|
| Workload | 0–4 | 5 | Instruction count, ILP, memory intensity, vector util, matmul ratio |
| Configuration | 5–25 | 21 | Mesh size, fetch/STANUM/VLEN, DMEM/WMEM/IMEM, NoC width, ports, node |
| Partitioning | 26–28 | 3 | DMEM input/output/scratch allocation ratios |
| Load Distribution | 29–32 | 4 | Load variance, max/min load ratio, balance score |
| Op Partition | 33–36 | 4 | MatMul/Conv/general partitioning ratios |
| Hazards | 37–40 | 4 | Global RAW/WAR/WAW statistics |
| Action Group | Idx Range | Dims | Update Scope |
|---|---|---|---|
| Discrete Mesh/SC Deltas | 0–3 | 4 | Mesh width/height and SC x/y in {-2..+2} (5-way one-hot each) |
| Continuous TCC Params | 4–18 | 15 | Fetch, STANUM, VLEN, DMEM/WMEM/IMEM, DFLIT, ports, clock, precision |
| Memory/Load Partition | 19–22 | 4 | DMEM input/output fractions and load-balance controls |
| Op-Partition Controls | 23–25 | 3 | MatMul/Conv/general operation split ratios across TCCs |
| Streaming | 26–27 | 2 | Input/output streaming ratio controls |
| Workload Partition | 28–29 | 2 | Sub-matmul partition and all-reduce fraction |
| Component | Type | Range | Description |
|---|---|---|---|
| Reward | Norm. perf (higher=better) | ||
| Penalty | Norm. power (lower=better) | ||
| Penalty | Norm. area (lower=better) | ||
| Bonus | Feasibility + power margin | ||
| Penalty | Cubic constraint viol. | ||
| Penalty | Linear memory overuse |
| Parameter | Value | |
| SAC | Hidden layers | [256, 256] |
| LR ( , , ) | ||
| Batch / | 256 / 0.005 | |
| Warmup | 1,000 | |
| PER | Buffer cap. | 100K |
| / | 0.6 / 0.4 1 |
| Hyperparameter | Value | Component | Description |
|---|---|---|---|
| Actor LR / Critic LR / LR | SAC | All three learning rates | |
| Discount Factor ( ) | 0.99 | SAC | Future reward discount |
| Soft Target Update ( ) | 0.005 | SAC | Polyak averaging for target Q-networks |
| Initial Entropy ( ) | 0.2 | SAC | Auto-tuned via Eq. 45 |
| Target Entropy | SAC | (negative action dim) | |
| Mini-batch Size | 256 | SAC | Sampled from PER buffer |
| Parameter | Min | Max | Notes |
|---|---|---|---|
| FETCH_SIZE | 1 | 16 | Instruction fetch width (per-TCC) |
| STANUM | 1 | 32 | Reservation stations |
| VLEN (bits) | 128 | 2048 | Vector register length (per-TCC) |
| DMEM_SIZE_KB | 16 | 512 | Data memory per tile |
| WMEM_SIZE_KB | 256 | adaptive | Weight ROM (model-dependent) |
| IMEM_SIZE_KB | 1 | 128 | Instruction memory per tile |
| Component | Value | Description |
|---|---|---|
| Target Model | Llama 3.1 8B FP16 | Decoder-only transformer model |
| Total Weights | 14.96 GB | Weight tensors mapped to WMEM |
| Operators | 7,489 | Unified graph operator count |
| Weight Tensors | 291 | Initializer tensors used by codegen |
| Inputs / Outputs | 66 / 65 | Graph interface tensors |
| Process Nodes | 3, 5, 7, 10, 14, 22, 28 nm | Technology nodes evaluated |
| Characteristic | Value | Description |
|---|---|---|
| Model Family | Llama 3.1 8B FP16 | Decoder-only transformer |
| Parameters | 8.03B | Total model parameters |
| Operators | 7489 | Unified graph operators |
| Total Weights | 14.96 GB | FP16 weight footprint |
| Best Mesh | 41x42 | Best node mesh (3nm) |
| Best Throughput | 29809 tok/s | Batch=3 seq-len=2048 |
| Node | Mesh | Cores | Scaling | Power (mW) | Perf (GOps) | Area (mm 2 ) | PPA |
|---|---|---|---|---|---|---|---|
| 3nm | 41x42 | 1722 | 1.00x | 51366 | 466364 | 648 | 0.974 |
| 5nm | 39x39 | 1521 | 0.88x | 57153 | 338116 | 929 | 0.989 |
| 7nm | 33x34 | 1122 | 0.65x | 46208 | 173899 | 1220 | 0.996 |
| 10nm | 26x27 | 702 | 0.41x | 25134 | 99939 | 1572 | 1.005 |
| 14nm | 21x22 | 462 | 0.27x | 14161 | 51072 | 1992 | 1.016 |
| 22nm | 16x16 | 256 | 0.15x | 7093 | 18077 | 2882 | 1.023 |
| Node | Mesh | Cores | Freq (MHz) | Power (mW) | Perf (GOps) | Area (mm 2 ) | PPA | Tok/s |
|---|---|---|---|---|---|---|---|---|
| 3nm | 41x42 | 1722 | 1000 | 51366 | 466364 | 648 | 0.974 | 29809 |
| 5nm | 39x39 | 1521 | 820 | 57153 | 338116 | 929 | 0.989 | 21612 |
| 7nm | 33x34 | 1122 | 570 | 46208 | 173899 | 1220 | 0.996 | 11115 |
| 10nm | 26x27 | 702 | 520 | 25134 | 99939 | 1572 | 1.005 | 6388 |
| 14nm | 21x22 | 462 | 400 | 14161 | 51072 | 1992 | 1.016 | 3264 |
| 22nm | 16x16 | 256 | 250 | 7093 | 18077 | 2882 | 1.023 | 1155 |
| Node | Mesh | Compute | SRAM | ROM Rd | NoC | Leak | Total | Comp% | SRAM% | ROM% | NoC% | Leak% |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3nm | 41x42 | 27517 | 1324 | 2779 | 17116 | 2631 | 51366 | 53.6 | 2.6 | 5.4 | 33.3 | 5.1 |
| 5nm | 39x39 | 30774 | 1439 | 2634 | 19143 | 3163 | 57153 | 53.8 | 2.5 | 4.6 | 33.5 | 5.5 |
| 7nm | 33x34 | 25241 | 1178 | 1914 | 15701 | 2175 | 46208 | 54.6 | 2.5 | 4.1 | 34.0 | 4.7 |
| 10nm | 26x27 | 15138 | 726 | 1398 | 6676 | 1196 | 25134 | 60.2 | 2.9 | 5.6 | 26.6 | 4.8 |
| 14nm | 21x22 | 9592 | 467 | 702 | 2784 | 616 | 14161 | 67.7 | 3.3 | 5.0 | 19.7 | 4.4 |
| 22nm | 16x16 | 5559 | 276 | 222 | 894 | 142 | 7093 | 78.4 | 3.9 | 3.1 | 12.6 | 2.0 |
| Analysis | Metric | Slope/Corr | Const | R 2 /Note |
|---|---|---|---|---|
| log-log fit | Performance (GOps/s) | -1.3284 | 1850000.0 | 0.9856 |
| log-log fit | Power (mW) | -0.9012 | 420000.0 | 0.9234 |
| log-log fit | Area (mm2) | 0.7521 | 195.0 | 0.9948 |
| pearson corr | Perf vs Power | 0.9812 | - | node-level |
| pearson corr | Perf vs Area | -0.8234 | - | node-level |
| pearson corr | Perf vs PPA | -0.9456 | - | node-level |
| Run Metric | Value | Description |
|---|---|---|
| Evaluated Nodes | 7 | 3nm 5nm 7nm 10nm 14nm 22nm 28nm |
| Best Node | 3nm | Lowest PPA score in this run |
| Best Mesh | 41x42 | Active TCC mesh at best node |
| Best PPA Score | 0.974 | Optimal configuration score |
| Best Throughput | 29809 tok/s | Batch=3; seq-len=2048 |
| Optimization Mode | high-performance | Maximize throughput |
| Region | Avg WMEM (MB) | Avg DFLIT (bits) | Avg FETCH |
|---|---|---|---|
| Edge | 10.21 | 6776.0 | 9.17 |
| Inner | 10.20 | 6776.0 | 9.14 |
| Center | 9.46 | 6776.0 | 8.31 |
| Parameter | Min | Max | Mean | Median | Std Dev | Unique |
|---|---|---|---|---|---|---|
| FETCH_SIZE | 2 | 4 | 2.50 | 2.00 | 0.71 | 2 |
| VLEN (bits) | 1024 | 2048 | 1536.00 | 1024.00 | 512.00 | 2 |
| WMEM (KB) | 9564 | 72128 | 16910.00 | 9564.00 | 18000.00 | varies |
| DMEM (KB) | 64 | 1024 | 64.00 | 64.00 | 96.00 | varies |
| IMEM (KB) | 3 | 12 | 6.10 | 6.00 | 2.50 | varies |
| Node | Power (mW) | Perf (GOps/s) | Area (mm 2 ) | PPA Score |
| 28nm | 3780 | 9744 | 3545 | 1.019 |
| 3nm | 51366 | 466364 | 648 | 0.974 |
| 3nm vs 28nm | 13.59x | 47.86x | 0.18x | 0.96x |
| Node | GOps/s per mW | tok/s per mW | GOps/s per mm 2 | PPA Score |
|---|---|---|---|---|
| 3nm | 9.076 | 0.5802 | 719.7 | 0.974 |
| 5nm | 5.914 | 0.3782 | 364.1 | 0.989 |
| 7nm | 3.764 | 0.2406 | 142.5 | 0.996 |
| 10nm | 3.976 | 0.2541 | 63.6 | 1.005 |
| 14nm | 3.606 | 0.2305 | 25.6 | 1.016 |
| 22nm | 2.549 | 0.1629 | 6.3 | 1.023 |
| Node | Mesh | Freq | Power | Area | Tok/s | PPA |
|---|---|---|---|---|---|---|
| (MHz) | (mW) | (mm 2 ) | ||||
| 3nm | 2 4 | 10 | 6.4 | 17.6 | 10.3 | 0.254 |
| 5nm | 3 4 | 10 | 12.7 | 26.2 | 14.1 | 0.309 |
| 7nm | 3 4 | 10 | 12.4 | 35.0 | 14.1 | 0.312 |
| 10nm | 3 3 | 10 | 8.6 | 46.7 | 10.0 | 0.291 |
| 14nm | 2 4 | 10 | 6.3 | 61.7 | 10.3 | 0.271 |
| Platform | Tok/s | Power | T/s/W | Notes |
| H200 | 230 | 700 W | 0.3 | 4nm GPU |
| B200 | 353 | 1 kW | 0.4 | 4nm GPU |
| Groq | 594 | 300 W ∗ | 2.0 | 14nm ASIC |
| SambaNova | 932 | 300 W ∗ | 3.1 | Dataflow |
| Cerebras | 1,981 | 15 kW ∗ | 0.1 | 7nm wafer |
| Taalas HC1 | 16,960 | 250 W ‡ | 67.8 | 6nm, 815 mm 2 |
| Method | PPA | Tok/s | Power | Feasible |
|---|---|---|---|---|
| Score | (W) | Configs | ||
| Random Search | 1.12 | 8,421 | 38 | 312 / 4,600 |
| Grid Search | 1.05 | 14,230 | 42 | 890 / 4,600 |
| SAC (ours) | 0.974 | 29,809 | 51 | 2,847 / 4,600 |
AI Accelerator Inference
AI accelerator inference studies hardware and software for running neural networks faster and more efficiently across data-center, edge, and mobile devices.
See all 103 papers