Why chips sold under the exact same vendor label often break each other's fast code. A plain-English visual guide across ten hardware architectures—plus live measurements off a Google Cloud TPU v6e-1 Trillium.
Zero prior assembly knowledge required — we build up from first principlesCommit d3c342e
00 · Start Here · No Assembly Background Needed
The four-room factory inside every AI chip.
Before we name a single instruction or hardware vendor, picture what happens inside any modern AI chip—an NVIDIA GPU, an AMD Instinct accelerator, an Apple Mac, an Intel server CPU, a Huawei NPU, or a Google Cloud TPU—when it runs one single layer of a neural network.
Beneath all the brand jargon, every AI chip is a microscopic factory floor made of four rooms. Almost every surprise speedup—and almost every catastrophic slowdown—is just a story about how quickly numbers move from Room 1 to Room 4.
ROOM 01 · THE WAREHOUSE
Main Memory (HBM / DRAM)
Huge (32 to 192 GB), big enough to store an entire language model. Physically farthest from the math circuits. Walking back and forth to the Warehouse costs time and energy.
ROOM 02 · THE WORKBENCH
On-Chip Scratchpad (SRAM / VMEM / LDS)
Tiny (kilobytes to a few dozen megabytes), sitting microns from the multipliers. You fetch small rectangular tiles of numbers onto the Workbench so you can reuse them dozens of times.
ROOM 03 · THE HEAVY MATRIX PRESS
Tensor Core / MXU + Holding Tray
Crunches thousands of tiny numbers (FP4, FP8, INT8, BF16) per clock cycle and drops the running sums into a high-precision holding tray called the Accumulator.
ROOM 04 · THE FINISHING BENCH
Vector Unit / ALU ("The Epilogue")
After multiplying, you add bias, apply quantization scales, run activations (SiLU/GELU), or compute softmax. That finishing pass is called the epilogue.
PLATE 01 · HOW ONE MATRIX LAYER FLOWS THROUGH SILICONKeep these 4 rooms in mind for the entire essay
Class A & B chips hand sums directly from Room 3 to Room 4 on-chip. Class C chips force an expensive detour back through Room 1.Same factory floor across all 10 vendorsQuick Field Glossary — 10 Hardware Words in Plain EnglishClick to collapse
ISA (Instruction Set Architecture)
The exact binary commands a chip's circuits know how to decode and execute.
HBM (High Bandwidth Memory)
The stacked off-chip RAM around a GPU/TPU (Room 1). Huge and fast by DRAM standards, still far slower than on-chip memory.
SRAM / SMEM / LDS / UB / VMEM
Different brand names for Room 2 (the on-chip Workbench): NVIDIA says SMEM, AMD says LDS, Huawei says UB, Google TPU says VMEM.
Register File (RF / GRF / VGPR)
Private desk slots right next to each worker thread—the fastest, tiniest memory on the chip.
Accumulator (TMEM, L0C, PSUM, AGPR, TMM)
The Holding Tray inside Room 3 where the Matrix Press adds up high-precision dot-product totals.
Epilogue
All cleanup math run right after a matrix multiply (bias, quantization scale, GELU/SiLU, softmax) before saving results.
Warp / Wavefront / SIMD-Group
A crew of threads executing the same command in lockstep (32 threads on NVIDIA/Apple, 32 or 64 on AMD).
Operational Intensity (OI)
Math operations divided by bytes fetched from HBM. Low OI = waiting on memory; high OI = Matrix Press running full speed.
Roofline Kill-Switch
The exact matrix size or batch limit where a clever compression trick stops helping and runs slower than simple math.
Scoreboard / Barrier
Hardware traffic lights that pause an instruction until an earlier slow memory copy or matrix multiply has finished.
01 · Why Brand Names Lie
The biggest hardware cliffs happen inside the same vendor.
Software teams almost always organize AI hardware by brand label: one column for "CUDA," one for "AMD," one for "Intel," one for "Huawei Ascend," one for "Apple Silicon." When we built ten offline hardware databases totaling 415,221 verified instruction, binary encoding, latency, and sync records—and audited every chip revision side by side—every single vendor column cracked right down the middle.
NVIDIA "Blackwell": Three Mutually Incompatible Chips Under One Name
If you tell an engineer a kernel was written for "NVIDIA Blackwell," you have not told them whether it can even compile. Inside the Blackwell generation sit three different physical contracts: datacenter B200 (SM100), refreshed datacenter B300 (SM103), and consumer RTX 5090 (SM120).
On a datacenter B200, the Matrix Press gets its own private 256 KiB Tensor Memory (TMEM) Holding Tray fed by 5th-generation asynchronous commands (tcgen05). On a consumer RTX 5090, that private Holding Tray does not exist at all: sums live in the ordinary worker Register File, matrix commands change to warp-synchronous OMMA.SF, Hopper's wgmma is gone, cluster multicast DMA is gone, hardware FP32 warp reduction (redux.sync.f32) is gone, and warp-shuffle (SHFL) bandwidth is cut in half (~0.5 vs ~1.0 requests/cycle per SM). Meanwhile, datacenter B300 drops INT8 Tensor Core ops (UTCIMMA) entirely to double FP4 throughput.
What this means in practice: A compiler or tuning agent that groups hardware by "CUDA" or "Blackwell" silently attempts to port B200 instructions onto an RTX 5090 where those circuits literally do not exist. You must target exact chip revisions, never vendor umbrellas.
Huawei Ascend, AMD, Intel, and the Apple Neural Engine Myth
The exact same intra-vendor split repeats everywhere we looked:
Huawei Ascend: On Ascend 910B & 910C, Huawei physically separated the Matrix core (Cube) from the Vector Finishing Bench with zero direct on-chip wire—forcing matrix sums out to off-chip HBM memory and back again. One generation later, Ascend 950 & 960 wired the on-chip Fixpipe → UB bridge back in and added hardware FP4 matrix math (MMAD_MX).
AMD & Intel: AMD's datacenter CDNA4 (MI355X) gives each compute unit 160 KB LDS, dedicated AGPR accumulators, and hardware FP4 V_MFMA_SCALE, whereas consumer RDNA4 has zero AGPR, zero FP64 matrix ops, and zero FP4 scaling—yet adds split wait counters and S_CLAUSE that CDNA1–4 lack. Intel's Arc Xe2 packs a rare native INT2 systolic matrix multiply (dpas), while Xe3p doubles registers per thread (32 KiB) and adds block-scaled FP4 bdpas.
Debunking the "32 MB Apple ANE SRAM" Myth: Widely repeated summaries—including our own v1 Atlas—claimed Apple's Neural Engine exposes ~32 MB of programmable on-chip SRAM. Decompiled hardware-abstraction tables in metal_kb.sqlite (ane_docs ch. 20, 21, 24, Appendix E) prove field HAL[0x1b8] = 2 MB caps every single tensor operand constant across M1–M5 (dense weight cap 64 KB; measured throughput cliff at 2.28–2.34 MB on M1 and 4.72 MB on M5; 0.23 ms dispatch floor). Direct hardware submission is also locked behind private entitlement com.apple.ane.iokit-user-access (user binaries fail with 0xe00002e2). Treat ANE as a CoreML/MIL graph target (Conv1x1 NCHW ≤ 2 MB), not a programmable low-level ISA.
02 · Room 3 to Room 4 · Accumulator Physics
Three ways chips wire the holding tray—and one mistake three vendors repeated.
It is deeply tempting to invent one universal "Matrix Tile" type in a compiler and pretend Blackwell TMEM, Ascend L0C, Trainium PSUM, Tenstorrent Dst, Intel AMX TMM, and AMD AGPR are interchangeable. Our red-team audit killed that abstraction immediately.
Why? Because chips wire Room 3 (the Holding Tray) to Room 4 (the Finishing Bench) in three completely incompatible ways. Whether a fused attention or quantized GEMM kernel stays fast or falls off a 10×–100× memory cliff depends almost entirely on which class your chip sits in:
PLATE 02 · THE THREE ACCUMULATOR EPILOGUE CLASSESWhy one universal "AccTile" hides huge hardware spill cliffs
Three independent hardware vendors built Class C first, felt the spill cliff, and wired an on-chip bridge one generation later.Live CLI: isa-kb locality-path Ascend910B
Notice the uncanny historical symmetry: Huawei (Ascend 910B → 950), Intel (Emerald Rapids AMX → AMX_AVX512), and AWS (Trainium NC-v2 → NC-v3) each discovered the exact same bottleneck independently and shipped an on-chip epilogue bridge in the very next silicon revision.
LAB 01 · INTERACTIVE CHIP-TO-CHIP COMPARATORClick any pair to see what breaks when porting kernels
Pick two chips below—including pairs sold under the same vendor name—to inspect how their Holding Tray class, hardware instructions, and plain-English engineering rules diverge.
03 · Inside the Execution Pipelines
Six subtle hardware traps compilers walk straight into.
Even when an instruction exists on your chip, real silicon imposes hidden traffic lights: shared execution ports, mode switches that wipe registers clean, and undocumented control-word rules. Every trap below was extracted directly from measured cycle tables (216,382uops.info rows) or formal vendor hardware specs.
TRAP 01 · INTEL XEON AMX
Setting tile shape inside a loop costs 200 cycles
LDTILECFG (which tells Intel AMX the row/column shape of your matrix tile) expands into 57 micro-ops taking 200.45 cycles on Emerald Rapids. Worse, forgetting TILERELEASE at function exit leaves the OS dirty bit set, forcing Linux to save 8 KiB+ of tile state on every thread switch.
Fix: Hoist LDTILECFG outside loops; always emit TILERELEASE before returning.
TRAP 02 · INTEL PORT 5 VS AMD ZEN5
Byte-table lookups jam Intel AMX—yet fly on ZEN5
CPUs route operations through numbered pipelines ("ports"). On Intel EMR/ICL/ADL-P, VPERMB (used for 4-bit LUT dequantization) needs Port 5—the exact same Port 5 used by AMX TDPBSSD, causing a head-on traffic jam. On AMD ZEN5, VPERMB runs at 2× speed (tp=0.5), yet VPGATHERDD explodes to 19 micro-ops.
Fix: Use VPSHUFB (Port 1/5) next to Intel AMX; avoid VPGATHERDD on ZEN5.
TRAP 03 · NVIDIA SM100 & SM120
Fragile .reuse bits & 35.9% silent evictions
NVIDIA SASS instructions carry a .reuse hint to hold a register in a tiny operand cache. Combining .reuse with yield=1 triggers an immediate hardware trap—and profiling 228,935libcublas SM120 operands shows 35.9% of .reuse tags are evicted before anything reads them. Meanwhile SM100 RAW latencies hit 19–20 cycles into MMA.
Fix: Keep usched_info in 17..27 with .reuse; never treat .reuse as guaranteed SRAM.
TRAP 04 · ARM SME2
Entering matrix mode literally wipes all vector registers
ARM's formal hardware pseudocode (SetPSTATE_SM in arm_kb.sqlite) runs ResetSVEState() on every SMSTART and SMSTOP—architecturally zeroing all 32 vector registers (Z0–Z31) and 16 predicates! Running normal NEON ops inside streaming mode also traps (ESR_EL1.EC = 0x1D).
Fix: Spill live vectors first; keep streaming SME regions coarse and separate from NEON.
TRAP 05 · HUAWEI ASCEND 910B/C
Illegal scalar barriers vs zero-cost hardware UNIT_FLAG
Ascend's scalar unit (PIPE_S) is strictly in-order—emitting PipeBarrier<PIPE_S>() is illegal. Meanwhile, manually placing software SetFlag<M_FIX> between matrix multiply and Fixpipe wastes cycles when hardware UNIT_FLAG overlaps them for free. And intra-core M_V barriers do not sync separated Cube/Vector cores on 910B.
Fix: Use UNIT_FLAG on M↔FIX; use CrossCoreSetFlag (max 15) on 910B.
TRAP 06 · APPLE AMX & MOBILE GPU DISCARD
Double-activating Apple AMX crashes; shaders hide discard
Running Apple's undocumented CPU AMX set (0x00201220) while AMX is already active traps immediately with #UD. Separately, both Apple AGX (discard) and ARM Mali (reg^) expose a brilliant register-cache "drop dead temporary without writing back" bit—the dual of NVIDIA's .reuse—yet zero shader languages expose it.
Fix: Enforce strict RAII set/clr pairing on Apple AMX.
04 · Compression & Emulation Physics
Every clever math trick has a threshold where it flips slower.
Modern AI chips shrink expensive 64-bit (FP64) floating-point circuits to pack in giant 8-bit (INT8) and 4-bit (FP4) matrix engines. In response, researchers invented clever numerical tricks: packing LLM weights into 4 bits and unpacking them in registers, or emulating full scientific FP64 accuracy using fast INT8/FP4 tensor cores.
How "Ozaki Scheme II" (INT8 CRT) Works in Plain English: Think of telling time using 14 clocks with different dial sizes (256, 255, 253, 251, ...). If you break a huge precise number into its 14 small remainders on those dials, each remainder fits inside a tiny 8-bit integer! You multiply all 14 slices on the chip's blazing-fast INT8 matrix engine, take the remainder on each dial, and use the Chinese Remainder Theorem (CRT) to reconstruct the exact 64-bit answer—running up to 5.5× faster on Blackwell and 12–28× faster on Intel Arc Xe2.
Across 35 verified 2024–2026 research papers in our monograph, every single headline trick obeys a strict roofline kill-switch: push it below its operational intensity floor or above its batch ceiling, and the extra unpacking or remainder cleanup makes it slower than simple native arithmetic.
Optimization Trick
Where It Wins Big
Exact Kill-Switch (Where It Loses!)
Outlook
Ozaki-II INT8 CRT (14–15 INT8 GEMMs → FP64)
Large dense GEMM on FP64-throttled chips (5.5× Blackwell, 12–28× Arc Xe2)
1. Bandwidth floor (OI* = 0.56 FLOP/B, arXiv:2610.10924): memory-bound GEMV/SpMV runs 0.3–0.9× slower. 2. Integer-Epilogue Wall (arXiv:2606.23698): 3-D FFT burns 203–281 int ops/output (measured live at 14.94× on Google TPU in §06!). 3. Small N / native FP64: loses below N~1211 and loses to MI300X native FP64 (163 TF).
SCOPED
Base-13 / AWE FP4 CRT (59 FP4 GEMMs → FP64)
Up to 83× native FP64 on B300 (arXiv:2609.37693); AWE trims 75→59 GEMMs
24-bit FP32 accumulator ceiling: exact sums overflow above K = 116,508. Needs huge matrices (N ≥ 8192–16384) to amortize 59 launches, and only wins where INT8 was removed (B300 / RTX 5090 / MI355X).
Batch ceiling (≤ 16–32): above batch 32, native FP4/FP8 matrix cores win. Silent BF16 overflow:BF16 has only 7 mantissa bits (vs FP16's 10), so Marlin's unshifted hi-nibble trick overflows bit 6!
2026–28 SUNSET
Hardware Codebook LUT (LUTI4, genlut, vlutvvb)
Dedicated hardware lookup tables avoid bank conflicts (M1 ANE 2.37×; ARM SME2 ZT0)
Emulating lookup tables via GPU warp SHFL / AMD DS_BPERMUTE hits the 0.5–1.0/c SM-wide exchange wall—only viable at tiny batch ≤ 8 when shared memory is idle.
HW SURVIVES
05 · Universal Choreography
Only two hardware state machines survive 2031 unchanged.
Writing a fast kernel is like choreographing a busy kitchen: ingredients must arrive from the Warehouse just before the chef needs them, and nobody can grab a dish while it is still half-cooked. Across all ten hardware architectures, we extracted six common choreography patterns and stress-tested them adversarially.
Four broke when pushed across different chips (for example, mobile tile-pass rendering TBDR only works for local pixel stencils, never for matrix multiply or full attention; and unifying modal register switches fails because 1-cycle RISC-V vsetvli is nothing like register-wiping ARM SMSTART). Exactly two hardware state machines generalize cleanly across every accelerator through 2031:
FSM 1 · THE CONVEYOR BELT
Double-Buffered Phase-Parity DMA
Keep two (or more) trays on the Workbench. While the Matrix Press crunches Tray A, a background DMA engine refills Tray B from HBM. A single flip-bit (phase parity) signals when each tray flips between Empty and Ready so math never reads half-copied bytes.
FSM 2 · TWO TICKET SYSTEMS
Claim Tickets vs Deli-Line Counters
Type A (Named Tokens): NVIDIA, Intel Xe, Ascend, Tensix, Mali give each slow load a numbered claim ticket—you can wait on Ticket #2 while Ticket #1 is still running. Type B (FIFO Counter): AMD GPUs use a deli line (S_WAITCNT)—you cannot wait on Order #2 without waiting for Order #1 first!
PLATE 03 · THE TWO UNIVERSAL HARDWARE STATE MACHINESCarbon-verified core across all 10 hardware KBs
Every discrete accelerator implements FSM 1; keeping Type A vs Type B explicit prevents silent stalls and races.Live verifier: isa_fsm_verify_schedule
Each tab below shows a realistic 2–3 line bug engineers accidentally write when moving between chips, followed by what the static hardware verifier catches and what happens on real silicon.
CANDIDATE KERNEL SNIPPET
06 · Live Hardware Experiment · Google Cloud TPU v6e-1 Trillium
Probing black-box silicon from the outside.
Unlike ARM, AMD, RISC-V, and Tenstorrent, Google does not publish a binary instruction manual for Cloud TPUs. Rather than guess from high-level whitepapers, we treated a real TPU like a physics experiment: run carefully designed benchmarks in JAX and Pallas, inspect the exact compiled XLA compiler output (HLO), and measure where the real silicon hits cliffs.
On 2026-12-03T00:35:08Z, we spun up an on-demand Google Cloud TPU v6e-1 Trillium (TPU v6 lite, 31.25 GiB HBM2e, jax 0.6.2) in asia-northeast1-b, collected the full 44 KB JSON receipt (receipt_tpu_v6e_silicon_probe.json, recorded in KernelKnievel as rcpt-58540369 & rcpt-58542640), and deleted the VM immediately afterward.
PLATE 04 · LIVE GOOGLE TPU v6e-1 TRILLIUM EMPIRICAL CLIFFSasia-northeast1-b · jax 0.6.2 · measured median of 7–12 runs
Five Trillium hardware cliffs measured live off real silicon & compiled XLA HLO.Receipt: receipt_tpu_v6e_silicon_probe.json
What Those Three Charts Mean in Plain English
1. Even inside 8-bit floating point, format choice creates a 1.56× cliff. Most developers assume any 8-bit float runs twice as fast as 16-bit BF16. On live TPU v6e-1 at N=8192, FP8 E5M2 hits 794.4 TFLOPS (beating BF16's 642.5 TFLOPS by 1.24×), while FP8 E4M3FN drops to 509.8 TFLOPS—actually running 20.6% slower than BF16! Meanwhile INT8 → INT32 rockets to 1,180.1 TOPS (1.18 POPS on a single chip!), and enabling jax_enable_x64 FP64 emits 748 lines of Knuth TwoSum software emulation at just 1.012 TFLOPS.
2. One innocent % operator triggers a 14.94× stall—and float reciprocal math cures it 10.83×. Running our 14-clock Ozaki-II INT8 matrix multiply at N=4096 took just 2.110 ms (911.9 TOPS) on the Matrix Press. Adding one naive remainder line—jnp.remainder(C_i32, mods)—exploded total time 14.94× to 31.530 ms because the TPU's Finishing Bench (VPU) lacks a fast hardware integer divider. Rewriting % m using precomputed float32 reciprocals (c - floor(c * (1/m)) * m) cut compiled HLO from 123 to 66 lines (0remainder ops), snapping runtime back to 2.911 ms (47.22 TFLOPS effective FP64—46.7× faster than XLA's built-in FP64).
3. Tile sizing on the Workbench spans 38.3×—right up to a hard 32 MiB cliff. Pure HBM streaming copy measured 1,076.0 GB/s, small batches M=1..256 sit flat on a 124–138 μs dispatch/weight-load floor, and adding one extra element to the inner contraction axis (K=4097) costs −14.9% across T(8,128)(2,1) tiling. Writing a 12-line custom Pallas kernel, small 128³ tiles starved the 256×256 MXU at 9.69 TFLOPS, scaling 38.3× to 371.24 TFLOPS at 1024³ (14 MiB VMEM)—before hitting a hard RESOURCE_EXHAUSTED VMEM stack OOM at 2048×2048×512 (32 MiB est.), confirming XLA's own 24.15–27.40 MiB scoped VMEM ceiling.
07 · Honest Engineering · Self-Audit (v1 → v2)
Ten silent bugs we caught inside our own Knowledge Graph.
The most dangerous bugs in compiler databases do not crash—they quietly omit half a vendor's chips or invent fake instruction links while still returning polite JSON. Before publishing a single table in this essay, we ran our own Redundancy Detector and Carbon Critic against KernelKnievel v1 (11,415 nodes / 52,859 edges). Here are the ten silent defects they caught and how we fixed every single one.
BUG 01 · SILENT TRUNCATION
An unordered SQL LIMIT 1200 erased 100% of AMD RDNA
Because datacenter CDNA rows appeared first in SQLite, capping the query at 1,200 rows left chip:AMD_RDNA1 through RDNA4 with zero nodes.
v2 Fix: Stratified per-chip queries restored all 10/10 AMD architectures.
BUG 02 · SILENT TRUNCATION
A second LIMIT 400 wiped 100% of Ascend hardware ops
All 19 core davinci_hw ops (including MMAD and FIXPIPE) and all 672 catlass kernel templates vanished from v1.
[:6] chopped Blackwell off 21 core NVIDIA PTX instructions
PTX lists oldest targets first (sm_70..sm_120a), so taking the first 6 items silently dropped Hopper and Blackwell support.
v2 Fix: Full target-list parsing preserves every SM through SM120a/f.
BUG 05 & 06 · PHANTOM LINKS
84 / 242 capability links pointed to typos or fake opcodes
Pre-registering ideal capabilities before reading SQLite created 84 phantom IDs (including typo UTMLDG for UTMALDG and false FP4 claims on Ascend 910B & Metal) plus 33 mislabeled node kinds.
v2 Fix: Mine all 10 KBs first + hard build-time assertion: phantom_count == 0.
BUG 07 · ISOLATED ISLANDS
309 SM100 latencies sat disconnected; WGSL & TPU unmined
A casing mismatch ('reg' vs 'GPR') left SM100 latency pipes unlinked, while 172 WGSL built-ins, 20 TPU Pallas docs, 80 MSL 4.1 specs, and 216,382 uops.info rows were skipped.
Never trust a cross-chip graph that does not fail its own build on a single phantom opcode.
Every fix above is regression-tested across 6/6 harness suites and 20/20 live MCP stdio tools + 5/5 resources + atomic hot-reload—with both live Google Cloud TPU v6e-1 Trillium empirical receipts permanently indexed in the graph.
11,820 / 48,174graph nodes / edges
0phantom primitives
17.4 ms10-KB federated search
20 / 20live MCP tools passing
COMPANION PAPER & ARCHIVE
Read the Markdown paper or explore the rest of the blog.
Every instruction, latency, sync rule, and live TPU v6e-1 measurement in this issue traces directly back to offline SQLite tables and raw JSON receipts.