# The Cliffs Inside the Silicon

**Why Chips From the Same Vendor Often Break Each Other's Code — A Plain-English Field Guide and 10-Architecture Forensic Audit (with Live Google Cloud TPU v6e-1 Trillium Measurements)**

By **Femi Adeniran** ([femiadeniran.com](https://femiadeniran.com/)) · Published with **Mostly Quantized** ([mostlyquantized.com](https://mostlyquantized.com/)) & **OmenWorks** ([omenworks.dev](https://omenworks.dev/))  
Date: **2026-12-02** · Issue: **Mostly Quantized Issue 02** · Companion System: **KernelKnievel v2** (`10` Hardware SQLite KBs · `415,221` verified records · `11,820`-node / `48,174`-edge zero-phantom Knowledge Graph · Live GCP `TPU v6e-1` Trillium Receipt)

---

## Before You Start: The Four-Room Factory Inside Every AI Chip

Before touching a single instruction name or benchmark table, picture how every modern AI accelerator—whether an NVIDIA GPU, an AMD Instinct card, a Huawei Ascend NPU, an Apple Mac chip, an Intel CPU with matrix extensions, or a Google Cloud TPU—actually runs one layer of a neural network.

At its heart, every chip is a tiny factory floor with **four rooms**:

1. **The Warehouse (Main Memory / HBM):** Huge (`32` to `192 GB`), capable of holding an entire language model, but physically far from the math circuits. Walking to the warehouse costs energy and time.
2. **The Workbench (On-Chip Scratchpad — SRAM, Shared Memory, LDS, UB, or TPU `VMEM`):** Tiny (tens of kilobytes to a few dozen megabytes), sitting microns from the compute units. You copy small rectangular tiles of numbers from the warehouse onto the workbench so you can reuse them dozens of times before throwing them away.
3. **The Heavy Matrix Press (Tensor Core, MXU, Cube Engine, MFMA, or AMX):** A specialized grid of multipliers that crunches thousands of low-precision numbers (`FP4`, `FP8`, `INT8`, `BF16`) per clock cycle and drops the running totals into a **holding tray called the Accumulator** (usually in higher precision like `FP32` or `INT32` so the sum does not lose accuracy).
4. **The Finishing Bench (Vector Unit / ALU — the "Epilogue"):** Once a matrix multiply finishes, you almost never stop there. You add a bias, scale by a quantization factor, apply an activation (`SiLU`, `GELU`), run `softmax` for attention, or convert back to `BF16`/`INT8`. That post-multiply cleanup step is called the **epilogue**.

Everything mysterious about AI hardware performance—and almost every bug when porting fast kernels from one chip to another—comes down to four physical questions about this factory floor:

- **How wide is the hallway between the Holding Tray and the Finishing Bench?** On some chips they sit on the same table. On others, there is *no internal doorway at all*, forcing the chip to ship unfinished sums back out to the Warehouse just to add a bias.
- **How do workers avoid reading half-delivered tiles?** Because copying from the Warehouse happens in the background while math runs in the foreground, every chip needs a **conveyor-belt handoff** and a **ticket system (scoreboard)** to keep fast and slow units from colliding.
- **Which number formats actually run on the fast press?** Two formats that look identical on paper (like two flavors of 8-bit float: `FP8 E5M2` vs `FP8 E4M3FN`) can run at radically different speeds on the same piece of silicon.
- **When does a clever compression trick stop paying for itself?** Packing weights into 4 bits or emulating 64-bit math with 8-bit integers only wins when the math saved is larger than the unpacking work you just added.

### Quick Glossary (Bookmark While Reading)

| Term | Plain-English Meaning |
|---|---|
| **ISA** | *Instruction Set Architecture* — the exact binary commands a chip's silicon knows how to decode and execute. |
| **HBM** | *High Bandwidth Memory* — the stacked off-chip RAM surrounding a GPU/TPU (the Warehouse). Fast by DRAM standards (`1–8 TB/s`), still much slower than on-chip SRAM. |
| **SRAM / Shared Memory / `VMEM` / `LDS` / `UB`** | Software-managed on-chip scratchpad memory (the Workbench). Different vendors give it different names: NVIDIA calls it Shared Memory (`SMEM`), AMD calls it `LDS`, Huawei calls it Unified Buffer (`UB`), Google TPU calls it `VMEM`. |
| **Register File (`RF` / `GRF` / `VGPR`)** | Ultra-fast private slots directly attached to each worker thread/lane—faster than SRAM, smallest capacity of all. |
| **Accumulator (`TMEM`, `L0C`, `PSUM`, `AGPR`, `TMM`, `ZA`)** | Where the Heavy Matrix Press adds up its running dot-product totals during a matrix multiply. |
| **Epilogue** | Everything done to a matrix tile *after* the multiply finishes (scaling, bias, activation, softmax, quantization, rounding) before storing it out. |
| **Warp / Wavefront / SIMD-Group** | A lockstep crew of threads executing the same instruction together (`32` threads on NVIDIA & Apple AGX, `32` or `64` on AMD, `8`–`32` on Intel Xe). |
| **Operational Intensity (`OI`)** | `FLOPs performed ÷ bytes moved from memory`. Low `OI` means the chip is **memory-bound** (waiting on the Warehouse); high `OI` means it is **compute-bound** (the Matrix Press is running full tilt). |
| **Roofline Kill-Switch** | The exact batch size, matrix dimension, or `OI` threshold where an optimization stops speeding your program up and starts making it *slower* than the simple baseline. |
| **Scoreboard / Barrier** | Hardware traffic signals that stall an instruction until an earlier slow memory load or matrix multiply has finished writing its result. |

---

## Abstract (What We Audited and What We Found)

Most software engineers, compiler frameworks, and benchmark charts organize accelerators by **brand name**: "CUDA," "AMD," "Intel," "Ascend," "Apple Silicon," "TPU."

To test whether those brand buckets match physical reality, we assembled **ten offline hardware knowledge bases** totaling **415,221 verified instruction, binary encoding, cycle latency, pipeline, and synchronization records**—spanning NVIDIA PTX 9.5 / SASS (SM75 through SM120), ARM AArch64 (v8-A/v9-A, SVE2, SME2), Apple Silicon (Metal 4.1, AGX GPU, CPU AMX, Neural Engine), Intel x86-64 (XED + `216,382` measured `uops.info` cycle rows) & Xe GPU (Gen12–Xe3p), AMD CDNA1–5 & RDNA1–4 (`40,059` official XML encoding rows), Huawei Ascend DaVinci 910–960 (`49` hardware pipe sync rules), Qualcomm Adreno/Hexagon & ARM Mali, Tenstorrent Tensix / AWS Trainium NKI / Google TPU Pallas, RISC-V (RV64GC, RVV 1.0, CSRs), and Khronos SPIR-V 1.6 / W3C WGSL. Then we ran an adversarial six-agent audit across all ten databases and validated Google's closed TPU architecture directly on live **Google Cloud TPU `v6e-1` Trillium** silicon.

Our central finding is simple and uncomfortable: **silicon cliffs inside a single vendor's product line are routinely larger than the differences between competing vendors.**

1. **Inside NVIDIA "Blackwell,"** a datacenter B200 (`SM100`) and a consumer RTX 5090 (`SM120`) do not share a tensor memory space, a matrix instruction set, a cluster multicast engine, or even warp-shuffle bandwidth.
2. **Across Huawei, Intel, and AWS,** the exact same generational architectural scar appeared independently three times: building a fast matrix press with **no direct on-chip doorway to the vector finishing bench**, forcing epilogues to spill out to L1 cache or off-chip HBM—followed one generation later by wiring the missing on-chip bridge.
3. **On live Google Cloud TPU `v6e-1` Trillium silicon,** five sharp cliffs appeared directly off hardware and compiled XLA HLO: a **`14.94×` VPU integer-division cliff** on 14-modulus Ozaki-II CRT (cured **`10.83×`** by rewriting modulo as float32 reciprocal multiplication), a **`1.56×` intra-FP8 cliff** where `FP8 E5M2` hits `794.4 TFLOPS` while `FP8 E4M3FN` drops to `509.8 TFLOPS` (slower than `BF16` at `642.5 TFLOPS`!), a **`5.10×` `FP32 HIGHEST` cliff**, a **`-14.9%` contraction-axis (`K=4097`) alignment cliff**, and a **`38.3×` Pallas `VMEM` tile-scaling span** terminating in a hard `RESOURCE_EXHAUSTED` stack OOM below `32 MiB`.
4. **Out of six candidate universal abstractions,** adversarial auditing amputated four as dangerous leaks and left **only two hardware state machines** that genuinely generalize across all ten architectures through 2031: **phase-parity ring-buffer DMA** and **explicitly typed scoreboard synchronization** (separating out-of-order named tokens from in-order FIFO counters).

Finally, we include an unvarnished self-audit of **ten silent bugs we caught inside our own v1 Knowledge Graph** before publishing—and the zero-phantom build check that eliminated them.

---

## 1. The Brand-Name Illusion: Why "CUDA" and "Blackwell" Are Not Architectures

If a compiler backend targets `cuda`, or a blog post measures "Blackwell," readers naturally assume code written for one Blackwell chip runs efficiently—or at least compiles cleanly—on another Blackwell chip. Inspecting the actual hardware encoding tables in `cuda_kb.sqlite` (`13,460` SASS instruction classes, `223` PTX 9.5 instructions, `1,666` latency rows, and `1,552` silicon-probed SASS notes) proves otherwise.

### 1.1 Three Incompatible Chips Inside NVIDIA "Blackwell"

Inside NVIDIA's single "Blackwell" generation live **three distinct execution contracts**: datacenter **B200 (`SM100`)**, refreshed datacenter **B300 (`SM103`)**, and consumer **RTX 5090 (`SM120`)**.

| Hardware Feature | B200 (`SM100`) | B300 (`SM103`) | RTX 5090 (`SM120`) | What This Breaks in Real Code |
|---|---|---|---|---|
| **Where matrix sums live (Accumulator)** | Dedicated **256 KiB Tensor Memory (`TMEM`)** read via `LDTM`/`STTM` | Dedicated **256 KiB `TMEM`** | **Ordinary Register File only** (`0` TMEM) | Every epilogue and register-allocation plan must be rewritten from scratch. |
| **Matrix instructions (`MMA`)** | 5th-gen asynchronous `tcgen05` (`UTCHMMA`, `UTCIMMA`, `UTCQMMA`, `UTCOMMA`) | Drops **`UTCIMMA` (INT8)**; doubles FP4 `UTCOMMA` | **Zero `tcgen05`**; uses warp-synchronous **`OMMA.SF`** | Both chips compute FP4 math, yet their PTX & SASS instructions are mutually exclusive—and B300 drops INT8 Tensor Core ops! |
| **Hopper `wgmma` (`sm_90a`)** | Replaced by `tcgen05` | Replaced by `tcgen05` | **Absent** | Hand-tuned Hopper FlashAttention-3 / GEMM kernels do not port forward unchanged to RTX 5090. |
| **Cluster Multicast DMA (`DSMEM`)** | Supported (`cta_group::2`) | Supported | **Absent** (`sm_120` excluded) | On B200, one HBM fetch feeds multiple SMs at once; on RTX 5090 every SM must pull its own copy from memory. |
| **FP32 Warp Reduction (`redux.sync.f32`)** | Hardware instruction | Hardware instruction | **Absent** | Softmax/norm reductions on RTX 5090 fall back to a multi-step `SHFL` tree. |
| **Warp-Shuffle (`SHFL`) Exchange Rate** | `~1.0` request/cycle per SM | `~1.0` request/cycle per SM | **`~0.5` request/cycle per SM** | Lookup-table dequantizers using `SHFL` stall **twice as fast** on RTX 5090. |

**What this means in practice:** If a compiler or AI agent reasons at the level of `"CUDA"`—or even `"Blackwell"`—and copies a B200 optimization onto an RTX 5090, it will emit instructions (`tcgen05.mma`, `LDTM`, `redux.sync.f32`, cluster TMA multicast) that **literally do not exist on the consumer die**.

Even tiny low-level scheduling hints carry sharp encoding cliffs. On NVIDIA GPUs, each SASS instruction carries a control word containing a `.reuse` bit (`bits[124:122]`) that tells the hardware operand cache to keep a register value warm for the next instruction. Setting `.reuse` alongside `yield=1` (outside `usched_info` codes `17..27`) triggers an immediate hardware trap (`ILLEGAL_INSTR_ENCODING_SASS_ONLY_ERROR`). Worse, profiling **228,935** `.reuse` operands inside NVIDIA's own `libcublas` on SM120 shows that **35.9% of `.reuse` tags get evicted before the next instruction ever reads them**—proving `.reuse` is a fragile microarchitectural hint, not a dependable software cache.

### 1.2 Huawei Ascend: The Off-Chip HBM Detour (`910B/910C`) vs Direct On-Chip Wiring (`950/960`)

Inspecting `ascend_kb.sqlite` (`7` chips, `8` hardware pipes, `49` hardware sync rules, `1,568` ops across `davinci_hw`, `hivm_ir`, `ascend_c`, and `catlass`) exposes an equally drastic intra-vendor split:

- **Ascend 910B (`dav-c220`) & 910C (dual-die):** Huawei physically separated the **Matrix Press (1 Cube core, AIC)** from the **Finishing Bench (2 Vector cores, AIV)** with **no direct on-chip wire between them** (`cube_vector_exchange = GlobalMemoryOnly`). To run bias + softmax after a matrix multiply, the Cube core drains its `128 KB` accumulator (`L0C`) through `FIXP` (`Fixpipe`) **all the way out to off-chip HBM Global Memory**, fires a cross-core hardware signal (`CrossCoreSetFlag<0x2, PIPE_FIX>`, capped at 15 in-flight flags), and waits for the Vector core to read the exact same numbers *back* off HBM via `MTE2` into its `192 KB` Unified Buffer (`UB`). Using a normal intra-core barrier (`SetFlag<HardEvent::M_V>`) **silently fails to synchronize them**. Fully **12 of Huawei's 49 DaVinci sync rules** exist solely to manage this expensive off-chip HBM bounce.
- **Ascend 950 (`dav-c310`) & 960 (`dav-920r1`):** Huawei wired the missing on-chip highway back in (`OnChipSupported`: direct **`Fixpipe -> UB`** and **`UB <-> L1`**), expanded on-chip buffers (`256–512 KB L0C`, `248–376 KB UB`), and added hardware block-scaled FP4/FP8 matrix multiply (`MMAD_MX`, absent on 910B/910C).

### 1.3 AMD, Intel, and the Apple Neural Engine Myth

Every other major hardware vendor exhibits the exact same internal fractures:

- **AMD (`amd_kb.sqlite`, `40,059` official XML encoding rows across 10 chips):**
  - **CDNA3 (MI300X)** is an HPC monster (`163 TFLOPS` native FP64 `V_MFMA_F64`, unified `AGPR` accumulator file, `64 KB` LDS, single monolithic `S_WAITCNT` counter).
  - **CDNA4 (MI355X, `gfx950`)** grows LDS `2.5×` to `160 KB/CU`, adds native block-scaled FP4/FP6/FP8 (`V_MFMA_SCALE_F32_16X16X128_F8F6F4`), 128-bit direct-to-LDS DMA (`GLOBAL_LOAD_LDS_DWORDX4`), and 3-input boolean `V_BITOP3_B32`.
  - **CDNA5 (`gfx1250+`)** introduces `TENSOR_LOAD_TO_LDS`, cluster-multicast DMA, split wait counters (`S_WAIT_LOADCNT`/`DSCNT`/`ASYNCCNT`), and split barriers (`S_BARRIER_SIGNAL`/`WAIT`).
  - **RDNA3 / RDNA4 (consumer Radeon)** have `V_WMMA` / `V_SWMMAC` and `S_CLAUSE` (which does *not* exist on CDNA1–4!), but **zero `AGPR`**, **zero native FP64 matrix ops**, and **zero FP4 `V_MFMA_SCALE`**.
- **Intel (`intel_kb.sqlite`, `2,046` x86 classes, `216,382` `uops.info` measurements, `91` Xe opcodes):**
  - **Arc Xe2 (Battlemage)** has `16 KiB` register file per thread and systolic `dpas`—including a rare superpower: **native `INT2`/`UINT2` systolic matrix multiply**—whereas **Xe3p-XPC** doubles registers to `32 KiB/thread` and adds block-scaled FP4/FP8 **`bdpas`**, `sendg`, and `dnscl`.
  - On Xeon CPUs, **Emerald Rapids AMX** gives vector AVX-512 instructions *zero* direct access to the `TMM0–7` matrix tile registers (forcing an L1 cache spill!), while next-gen **`AMX_AVX512`** finally adds direct register-to-register `TILEMOVROW` / `TCVTROW*`.
- **Apple Silicon (`metal_kb.sqlite`, `140` AGX GPU ops, `26` CPU AMX ops, `113` ANE docs):**
  - One M-series die houses **three completely unrelated compute fabrics**: the **AGX GPU** (32-wide SIMD-groups + tile-based deferred rendering `imageblock`), the **CPU AMX coprocessor** (undocumented AArch64 encodings at `0x00201000` with a `4 KiB` accumulator grid and `genlut` codebook lookup), and the **Apple Neural Engine (ANE)**.
  - **Debunking the "32 MB ANE SRAM" folklore:** Many online summaries—including our own v1 database!—claimed Apple's ANE exposes `~32 MB` of on-chip SRAM to kernels. Decompiled Apple hardware tables in `metal_kb.sqlite` (`ane_docs` ch. 20, 21, 24, Appendix E) tell a very different story: hardware field **`HAL[0x1b8]` caps every single tensor operand at `2 MB` constant across M1 through M5** (`64 KB` dense weight cap, `16 MB` streamed weight cap, measured throughput cliff at `2.28–2.34 MB` on M1 and `4.72 MB` on M5, `0.23 ms` dispatch floor). Furthermore, submitting custom programs directly to ANE requires Apple's private entitlement `com.apple.ane.iokit-user-access` (self-compiled binaries fail with error **`0xe00002e2`**). **Takeaway:** ANE is not a programmable low-level ISA at all—it must be treated cleanly as a high-level CoreML/MIL graph compiler target (`Conv1x1` NCHW tensors `<= 2 MB`).

---

## 2. The Three Accumulator Epilogue Classes (Why One "Universal Tile" Abstraction Fails)

When engineers design cross-platform kernel languages, the very first abstraction they reach for is a single universal matrix-accumulator type—something like `AccTile<T, M, N>`—meant to hide Blackwell `TMEM`, Ascend `L0C`, Trainium `PSUM`, Tenstorrent `Dst`, ARM SME `ZA`, Apple AMX `Z`, Intel AMX `TMM`, and AMD `AGPR` behind one uniform API.

Our adversarial red-team audit ("Carbon") proved why that abstraction fails catastrophically in practice: **every accelerator's accumulator falls into one of three physically incompatible epilogue classes**, and those classes control whether a fused kernel stays on-chip or hits a 10×–100× spill cliff.

| Class | How the Finishing Bench Reaches Matrix Sums | Silicon Examples | Practical Consequence |
|---|---|---|---|
| **Class A — Direct Register Access** | Vector math runs directly on the accumulator—or pulls rows straight into vector registers with **zero memory hops**. | AMD CDNA `AGPR` (`256 KiB/CU`), Tenstorrent Tensix `Dst` (`32 KiB`, plus zero-L1 loopback `MOVD2A/B`!), CUDA `SM120` RF, Intel `Xe2/3p` GRF, ARM SME `ZA`, Apple AMX `Z`, Intel **`AMX_AVX512`** (`TILEMOVROW`) | **Fastest fusion.** Adding bias, scaling, softmax, or chained attention stays completely inside registers. |
| **Class B — Explicit On-Chip SRAM Bridge** | Accumulator sits in a dedicated on-chip memory separate from vector registers; software issues an **explicit on-chip transfer** before running vector math. | NVIDIA `SM100/103` **`TMEM`** (`256 KiB/SM`, `LDTM`/`STTM`), AWS Trainium **`PSUM`** (`2 MiB`, 8 banks), **Ascend 950/960 `L0C`** (`256–512 KiB`, direct `Fixpipe -> UB`), Hexagon `HMX` | **Fast, but needs scheduling.** You must budget SRAM/register staging and overlap `LDTM` / `tensor_copy` with compute. |
| **Class C — Forced External Cache / HBM Spill** | **Zero on-chip doorway to the vector unit.** Every non-trivial epilogue must write the matrix sum out to L1 cache or **off-chip HBM** and read it back in. | **Huawei Ascend 910B/910C `L0C`** (`L0C -> FIXP -> HBM GM -> MTE2 -> UB`), **Intel EMR AMX `TMM0–7`** (`TMM -> TILESTORED -> L1D -> VMOVDQU64 -> ZMM`) | **Catastrophic spill cliff.** Chained GEMMs, FlashAttention, and CRT epilogues burn memory bandwidth unless redesigned around the spill. |

### The Exact Same Silicon Scar Repeated Across Three Independent Vendors

When we plotted memory-space paths across all ten KBs, the same hardware design mistake—and the exact same generational cure—showed up three separate times across three completely unrelated engineering teams:

1. **Huawei Ascend (`910B/910C -> 950/960`):** `L0C -> FIXP -> HBM -> MTE2 -> UB` (`2` hops, off-chip HBM spill) cured by direct on-chip `Fixpipe -> UB` (`1` hop).
2. **Intel Xeon (`EMR AMX -> AMX_AVX512`):** `TMM -> TILESTORED -> L1D -> VMOVDQU64 -> ZMM` (`2` hops, L1 cache spill) cured by direct `TILEMOVROW` / `TCVTROW*` (`1` hop).
3. **AWS Trainium (`NC-v2 -> NC-v3`):** Bank contention between `VectorE` and `ScalarE` reading `PSUM` cured by concurrent multi-bank `PSUM` access on Trainium2 (`NC-v3`).

If your compiler models each chip's exact bridge (`bridges_spaces(src, dst, direct_onchip, spill_via)`) instead of pretending all accumulators are `AccTile`, it warns you about Class C spill cliffs *before* you spend two weeks writing a doomed kernel.

---

## 3. Six Concrete Microarchitectural Traps Hidden Inside the Silicon

Even when two instructions live in the same register file and appear to compose cleanly in documentation, real silicon hides execution-port collisions, state-wiping mode switches, and illegal control-word combinations. Here are six traps extracted directly from measured cycle tables and formal ISA specifications:

### Trap 1: Intel `LDTILECFG` Costs 200 Cycles (and Forgetting `TILERELEASE` Slows Down the Whole OS)
On Intel Emerald Rapids (`intel_kb.sqlite`, measured `uops.info` data), loading a matrix tile shape with `LDTILECFG` expands into **57 micro-ops taking `200.45` clock cycles**. Putting `LDTILECFG` inside an inner loop obliterates AMX matrix speed—it must be hoisted outside the loop. Equally subtle: forgetting `TILERELEASE` when exiting leaves the CPU's `XINUSE` state bit dirty, forcing the Linux kernel to save and restore **8 KiB+** of AMX tile state via `XSAVE` on every subsequent thread context switch.

### Trap 2: The Port-5 Traffic Jam (`VPERMB` vs `TDPBSSD`) — and AMD ZEN5's Surprise Inversion
Modern x86 CPUs dispatch micro-ops onto numbered execution pipelines called **ports** (Port 0, Port 1, Port 5, etc.). If two instructions both require Port 5, they have to stand in single file:
- On **Intel Emerald Rapids (`EMR`), Ice Lake (`ICL`), and Alder Lake (`ADL-P`)**, `VPERMB` (the byte-lookup instruction used by T-MAC and LUT-GEMM 4-bit dequantizers) runs strictly on **Port 5 (`1*p5`, throughput `1.0`, latency `3.0`)**—the **exact same Port 5** used by AMX matrix multiply **`TDPBSSD` (`1*p5`)**! Trying to dequantize weights with `VPERMB` while feeding AMX tiles creates a head-on Port-5 traffic jam. Use `VPSHUFB` (which can dispatch on Port 1 *or* Port 5) instead.
- On **AMD ZEN5**, the hardware flips the script: `VPERMB` executes on `1*FP12` at **double the throughput (`tp = 0.5`, latency `2.0`)**—making byte-table LUTs scream on Ryzen/EPYC—**yet `VPGATHERDD` explodes to 19 micro-ops (`tp = 3.02`)** (and on Downfall-mitigated Intel Rocket Lake hits **14–17 micro-ops / 35–37 cycles**!). Never assume "gather" is fast on x86.

### Trap 3: CUDA SM100 Official Latencies & SM120's Shared `SHFL`/`LDS` Bottleneck
Official NVIDIA SM100 register-file Read-After-Write (RAW) latencies (`cuda_kb.sqlite`) show that feeding a matrix unit from a regular ALU/FMA instruction takes **19 cycles**, chaining `hmma -> hmma` takes **20 cycles**, and reading a matrix result back into ALU/FMA takes **7 cycles**. Meanwhile, on consumer **RTX 5090 (`SM120`)**, warp shuffle (`SHFL`) shares the **exact same SM-wide exchange pipe as shared-memory loads (`LDS`)** at just `~0.5` requests/cycle SM-wide—meaning warp-shuffle lookup tables run 4–8× slower than `FFMA`/`LOP3` and actively starve shared-memory loads.

### Trap 4: ARM SME2 `SMSTART` Literally Zeroes All Your Vector Registers
ARM's Scalable Matrix Extension (`SME` / `SME2`) uses `SMSTART` and `SMSTOP` to enter and exit "streaming SVE mode." Reading ARM's formal ASL hardware pseudocode (`arm_kb.sqlite`, `aarch64.functions.sve.SetPSTATE_SM`) reveals a brutal surprise: **every `SMSTART` or `SMSTOP` calls `ResetSVEState()`, architecturally wiping all 32 vector registers (`Z0–Z31`) and all 16 predicate registers (`P0–P15`) to zero!** Furthermore, running normal non-streaming NEON/SVE instructions while inside streaming mode raises a hardware exception (`ESR_EL1.EC = 0x1D`) unless the optional `FEAT_SME_FA64` extension is implemented. That is why treating 1-cycle RISC-V `vsetvli`, 200-cycle Intel `LDTILECFG`, and register-wiping ARM `SMSTART` as the "same modal region" inside a compiler guarantees mis-hoisting bugs.

### Trap 5: Ascend Illegal Scalar Barriers vs Zero-Cost Hardware `UNIT_FLAG`
On Huawei DaVinci NPUs (`ascend_kb.sqlite`, `ascend_sync_rules`), the scalar unit (`PIPE_S`) is strictly in-order—emitting `PipeBarrier<PIPE_S>()` is **illegal**. Conversely, manually inserting software `SetFlag<HardEvent::M_FIX>` between matrix multiply (`MMAD`) and `FIXPIPE` wastes cycles when DaVinci's built-in hardware **`UNIT_FLAG`** (`ENABLE_UPDATE` + `unitFlag=3`) automatically overlaps the Cube and Fixpipe stages with zero barrier instructions.

### Trap 6: Destructive Register-Cache Discard (`Apple AGX discard` ↔ `ARM Mali reg^`)
Both Apple AGX GPUs (`discard`) and ARM Mali Valhall GPUs (`reg^`, `mode=1`) have a clever final-read hint bit: it tells the register cache *"this temporary value is dead after this instruction—throw it away instead of writing dirty bytes back to the main register file."* It is the exact mathematical mirror of NVIDIA's keep-alive `.reuse` bit—yet **zero portable shader languages (MSL, SPIR-V, WGSL) expose it to developers**.

---

## 4. Roofline Kill-Switches: When Clever Math Trickery Runs *Slower* Than Native Arithmetic

Over 2024–2026, low-precision math emulation exploded in popularity: using blazing-fast `INT8` or `FP4` matrix cores to emulate accurate `FP64` (double precision) for scientific computing, or packing LLM weights into `INT4` and unpacking them on the fly in registers.

We synthesized **35 verified 2024–2026 arXiv papers** alongside all ten hardware KBs. One universal law governs every single trick: **every representation optimization carries an exact mathematical "kill-switch" where its extra unpacking or epilogue work makes it *slower* than simple native math.**

### How Ozaki Scheme II (INT8 CRT) Works in Plain English
Suppose you want accurate 64-bit (`FP64`) matrix multiplication on a modern AI chip whose `FP64` circuits were shrunk to make room for `INT8` tensor cores. Instead of running one slow `FP64` matrix multiply, **Ozaki Scheme II** uses the ancient **Chinese Remainder Theorem (CRT)**:
1. Pick `14` or `15` small coprime "clock sizes" (moduli like `256, 255, 253, 251, ...`).
2. Compute the remainder of each input entry modulo each clock size—each remainder fits cleanly into a single signed **8-bit integer (`INT8`)**!
3. Run `14` fast `INT8 -> INT32` matrix multiplies on the chip's tensor cores.
4. Take the remainder of each output sum modulo its clock size and combine the 14 residues back into the exact `FP64` answer!

On large dense matrices (`N >= 4096`), this delivers **`5.5×` speedups on NVIDIA Blackwell** and **`12–28×` on Intel Arc Xe2 `DPAS`**. So when does it fail? Look at the kill-switch table:

| Technique | Where It Wins Big | Exact Roofline / Numerical Kill-Switch (Where It Loses!) |
|---|---|---|
| **Ozaki Scheme II (INT8 CRT / RNS)** (`GEMMul8`, `EmuGEMM`) | Dense GEMM/ZGEMM on FP64-throttled silicon (`5.5×` Blackwell, `12–28×` Arc Xe2, linear `14–15` GEMMs) | **1. Bandwidth floor (`OI* = 0.56 FLOP/B`, `arXiv:2610.10924`):** On memory-bound GEMV/SpMV below `OI*`, it runs **`0.3–0.9×` slower** than native FP64 because moving 14 slices overwhelms HBM.<br>**2. Integer-Epilogue Wall (`arXiv:2606.23698`):** 3-D FFT burns `203–281` integer instructions per output (`4.9–6.7×` below HBM roof)—a wall we measured live at **`14.94×`** on Google TPU v6e in §6!<br>**3. Small matrices & native FP64:** Unfused CRT loses below `N ~ 1211` (`N = 2048` on Xeon AMX), and AMD MI300X (`163 TFLOPS` native FP64) beats it outright. |
| **Chained RNS (`OzII-RescaleBE`) & 2M Complex CRT** | `2.1×–60×` on chained tensor contractions (`arXiv:2610.05059`); `2×` fewer complex GEMMs using primes `p ≡ 1 (mod 4)` | Accuracy holds (`1e-16..2.6e-15`) up to chain depth **`d <= 7`**; at **`d >= 8`** error jumps to `7e-14..6e-13`. Requires on-chip residency—breaks on Ascend 910B's off-chip HBM bounce. |
| **Base-13 & AWE FP4 CRT** (`arXiv:2608.06812`, `2609.24519`, `2609.37693`) | Up to **`83×`** native FP64 on Blackwell B300; AWE cuts `75 -> 59` FP4 GEMMs | **24-bit FP32 accumulator ceiling:** `K_max = floor(2^24 / 144) = 116,508` before exact integer partial sums overflow `FP32` mantissa bits! Still requires `59` GEMM launches (`4×` INT8 Ozaki-II), so it needs huge matrices (`N >= 8192..16384`) and only wins where FP4 is `>= 2×` FP8 and INT8 is removed (B300 / RTX 5090 / MI355X). |
| **Marlin `LOP3<0xea>` W4A16 Register Dequant** | `3.87–4.0×` memory-bound LLM token generation (`4` instructions unpack `4` INT4 weights into `FP16`) | **Batch ceiling (`<= 16–32`):** Above batch 32, the chip becomes compute-bound and native FP4/FP8 matrix cores (`OMMA.SF`/`UTCOMMA`/`V_MFMA_SCALE`) crush software unpacking.<br>**Silent BF16 trap:** `BF16` has only `7` mantissa bits (vs `FP16`'s `10`), so Marlin's unshifted high-nibble magic **silently overflows bit 6**! |
| **Codebook LUT (`LUTI4/6`, `V6_vlutvvb`, `genlut`) vs GPU `SHFL` LUT** | Dedicated hardware lookup registers give zero bank conflicts (`2.37×` FP16 on Apple M1 ANE; 64B `ZT0` on ARM SME2) | Emulating a lookup table with GPU warp `SHFL` or AMD `DS_BPERMUTE` slams into the **`0.5–1.0/cycle` SM-wide exchange wall**—viable **only** at tiny `batch <= 8` when shared memory is otherwise idle. |

**Key design lesson:** Representation tricks (RNS residues, block-scaled FP4, codebook indices, XOR memory swizzles) are **value encodings and math rewrites**, not physical memory tiers. Keeping them explicitly separate from physical memory hierarchy—and attaching their exact negative regime—stops optimizers from deploying them where they hurt.

---

## 5. The Only Two Hardware State Machines That Survive 2031

Every high-performance kernel is ultimately a choreographer: keeping data arriving from the Warehouse on time while preventing compute units from tripping over unfinished writes. We extracted six recurring choreography patterns across all ten hardware KBs and tried to break each one with our Carbon red-team critic.

Four broke (or required narrow chip-specific guards). **Exactly two hardware finite-state machines survived intact across every architecture through 2031:**

### 5.1 Durable FSM 1: The Double-Buffered Conveyor Belt (`ring_buffer_phase_dma`)
To hide the latency of reading from HBM, every discrete accelerator uses a `P`-slot circular buffer (`P >= 2` stages) on its on-chip Workbench:

```text
  [FREE] --(reserve empty slot)--> [RESERVED] --(launch async DMA)--> [IN_FLIGHT]
    ^                                                                      |
    |                                                            (DMA done, flip phase bit)
    |                                                                      v
 (release empty slot) <--- [CONSUMING (Matrix Press)] <--- (wait full) --- [READY]
```

The exact same 5-state machine runs everywhere—only the syntax changes:
- **NVIDIA CUDA:** `mbarrier.{init,expect_tx,arrive,test_wait}` + `UTMALDG` (`cp.async.bulk.tensor`). *Classic bug:* mismatched `expect_tx` byte count or inverted phase parity hangs the thread block forever.
- **Huawei Ascend:** `TQue<BUFFER_NUM=2>` (`AllocTensor`/`EnQue`/`DeQue`/`FreeTensor`) over `MTE2`/`MTE1`.
- **Tenstorrent Tensix:** L1 Circular Buffers + 2-bank `SrcA`/`SrcB` ownership flip (`UNPACR_NOP_SETDVALID` ↔ `CLEARDVALID`). *Classic bug:* forgetting `CLEARDVALID` deadlocks the matrix engine permanently.
- **AWS Trainium:** `SBUF` (`24–28 MiB`) multi-buffered `nki.isa.dma_copy` / `dma_transpose`.
- **AMD CDNA4/5:** `GLOBAL_LOAD_LDS_DWORDX4` / `TENSOR_LOAD_TO_LDS` + `wait.asyncmark`.
- **Google Cloud TPU (verified live in §6!):** XLA HLO emits explicit `copy-start` / `copy-done` DMA between HBM and `S(1)` (`VMEM`) synchronized on `S(2)` (sync flag), and Pallas exposes it declaratively through pipelined `BlockSpec` tiles.

### 5.2 Durable FSM 2: The Two Ticket Systems (`scoreboard_credit_sync` — Explicitly Typed!)
When an instruction launches a slow memory load or matrix multiply, how does a later instruction wait for it? Almost every compiler bug happens because engineers lump **two fundamentally different hardware ticket systems** together:

1. **Type A — Named Claim Tickets (`named_barrier`, out-of-order):** You tag slow operation #1 with Token A and slow operation #2 with Token B. Later, you can wait specifically for **Token B** even while Token A is still running in the background!
   - *Who uses it:* NVIDIA SASS 6-barrier control words (`SB0..SB5`), Intel Xe 10-bit Software Scoreboard (`SWSB`: `$0..$31.dst/.src` + `@1..@7`), Huawei Ascend `EVENT_ID0..7` + `UNIT_FLAG`, Tenstorrent `STALLWAIT` + semaphores, ARM Mali Valhall `slot0..7`, Qualcomm Adreno `(sy)/(ss)`.
2. **Type B — Deli-Line Counters (`fifo_counter`, strictly in-order):** The hardware only counts *how many* loads are still in flight (`vmcnt`, `lgkmcnt`, `expcnt` on AMD CDNA/RDNA, split on RDNA4/CDNA5 into `S_WAIT_LOADCNT`/`DSCNT`/`ASYNCCNT`). You can say *"wait until at most 1 load remains in flight,"* **but you cannot wait for load #2 without first draining load #1!** That is why naive `s_waitcnt 0` destroys memory latency hiding on AMD GPUs.

### 5.3 What Carbon Amputated (and Why)
- **Amputated — Unified "Modal Register Region":** Conflating 1-cycle RISC-V `vsetvli`, 200-cycle Intel `LDTILECFG`, and register-zeroing ARM `SMSTART` inside one IR node guarantees broken loop-hoisting.
- **Amputated — General-Compute Mobile Tile-Pass (`TBDR`):** Apple AGX `imageblock` and Vulkan `LOAD_OP_DONT_CARE` keep pixels in fast on-chip tile memory *strictly* for 1:1 spatially local pixel/narrow-halo stencils. They fail categorically on GEMM, full self-attention, and global FFTs, where every output depends on entire rows/columns.
- **Portable Shader Reality Check (`spirv_wgsl_kb.sqlite`):** **Khronos SPIR-V 1.6** covers 9 core capabilities (`OpCooperativeMatrixMulAddKHR`, `OpSDot`, `OpGroupNonUniformShuffleXor`, split barriers), yet async 2D tensor DMA is shattered across four incompatible vendor extensions and KHR block-scaled FP4 MMA does not exist yet. **W3C WGSL (WebGPU + Subgroups)** genuinely ships 6–7 real primitives (`dot4I8Packed`, `subgroupShuffleXor`, `workgroupBarrier`, `atomicAdd`, `fma`), while lacking matrix MMA, async DMA, FP4/FP8/FP64/INT64, and enforcing **§15.2 static uniformity** that legally forbids producer/consumer warp-specialized divergent barriers.

---

## 6. Testing Black-Box Silicon From the Outside: Live Google Cloud TPU `v6e-1` Trillium Receipts

Unlike ARM, AMD, RISC-V, and Tenstorrent, Google does not publish a binary instruction-set manual for Cloud TPUs. Instead of repeating marketing specs, we treated a live TPU as a physical lab experiment.

On `2026-12-03T00:35:08Z`, we provisioned an on-demand **Google Cloud TPU `v6e-1` Trillium** (`TPU v6 lite`, `31.25 GiB` usable HBM2e, `jax 0.6.2`) in `asia-northeast1-b`, executed seven targeted JAX, Pallas (`jax.experimental.pallas.tpu` Mosaic), and compiled XLA HLO probes (`median` of 7–12 post-warmup timed runs), downloaded the raw 44 KB JSON receipt (`/home/omen/isa-kb/receipts/receipt_tpu_v6e_silicon_probe.json`, recorded into KernelKnievel as `rcpt-58540369` & `rcpt-58542640`), and deleted the VM immediately after download.

Five dramatic cliffs jumped straight off the live silicon:

### 6.1 Discovery 1: The Intra-FP8 Format Cliff (`FP8 E5M2` Beats `FP8 E4M3FN` by `1.56×`!)

Most ML engineers expect both 8-bit floating-point formats (`E4M3FN` and `E5M2`) to run at roughly `2×` the speed of `BF16`. On live Trillium silicon (`N = 8192`), reality splits right down the middle of 8-bit floating point:

| Precision / Accumulation Mode | `N = 1024` | `N = 2048` | `N = 4096` | `N = 8192` | What XLA HLO & Hardware Actually Do |
|---|---:|---:|---:|---:|---|
| **`INT8 -> INT32`** | `17.16 TOPS` (`0.125 ms`) | `129.34 TOPS` (`0.133 ms`) | **`644.06 TOPS`** (`0.213 ms`) | **`1,180.13 TOPS`** (`0.932 ms`) | Packed `T(32,128)(4,1)` VMEM layout — **`1.84×` faster than BF16**! |
| **`FP8 E5M2 -> FP32`** | `17.39 TFLOPS` (`0.124 ms`) | `119.55 TFLOPS` (`0.144 ms`) | **`492.42 TFLOPS`** (`0.279 ms`) | **`794.40 TFLOPS`** (`1.384 ms`) | **`1.24×` faster than BF16** and **`1.56×` faster than FP8 E4M3FN**! |
| **`BF16 -> FP32`** | `17.19 TFLOPS` (`0.125 ms`) | `123.30 TFLOPS` (`0.139 ms`) | **`469.52 TFLOPS`** (`0.293 ms`) | **`642.47 TFLOPS`** (`1.711 ms`) | Packed `T(8,128)(2,1)` VMEM (`24.15 MiB` used, `298,006` est. cycles @ `4096`). |
| **`FP8 E4M3FN -> FP32`** | `17.14 TFLOPS` (`0.125 ms`) | `112.98 TFLOPS` (`0.152 ms`) | **`365.24 TFLOPS`** (`0.376 ms`) | **`509.80 TFLOPS`** (`2.157 ms`) | **Surprise cliff:** runs **`20.6%` *slower* than BF16** despite half the bytes! |
| **`FP32 DEFAULT`** (BF16 MXU) | `17.15 TFLOPS` (`0.125 ms`) | `118.55 TFLOPS` (`0.145 ms`) | `469.44 TFLOPS` (`0.293 ms`) | **`408.48 TFLOPS`** (`2.692 ms`) | Silent BF16 truncation on MXU, yet pays **`-36.4%` HBM tax** reading 4-byte inputs. |
| **`FP32 HIGHEST`** (Multi-pass) | `16.04 TFLOPS` (`0.134 ms`) | `65.61 TFLOPS` (`0.262 ms`) | `121.67 TFLOPS` (`1.130 ms`) | **`125.97 TFLOPS`** (`8.728 ms`) | True FP32 via multi-pass BF16 (`1,706,325` est. cycles = **`5.10×` cliff** vs BF16). |
| **`FP64`** (`jax_enable_x64`) | — | — | — | `1.012 TFLOPS` (`N=512`, `0.265 ms`) | **Zero native FP64 dots:** XLA emits **748 lines of Knuth `TwoSum` double-single software emulation**! |

**Why this matters:** Switching weights or activations from `BF16` to `float8_e4m3fn` on TPU `v6e-1` expecting a `2×` speedup actually **slows your matmul down by `20.6%`**, whereas `float8_e5m2` speeds it up by `1.24×` and `INT8` pushes past **`1.18 POPS` (`1,180 TOPS`)** on a single chip!

### 6.2 Discovery 2: The `14.94×` TPU VPU Integer-Division Cliff — and Its `10.83×` Barrett Cure

Remember the "Integer-Epilogue Wall" from §4? We tested it live by running a **14-modulus Ozaki-II INT8 CRT** matrix multiply at `N = 4096` three different ways:

| 14-Modulus Variant (`N = 4096`) | Wall Time | Overhead vs Raw MXU | Effective Throughput | What XLA HLO Actually Emitted |
|---|---:|---:|---:|---|
| **1. Raw `14×` INT8->INT32 MXU** (no modulo epilogue) | **`2.110 ms`** | `1.00×` | **`911.93 TOPS`** (INT8) | Pure batched `T(32,128)(4,1)` MXU matmul. |
| **2. Naive Integer Modulo (`jnp.remainder`)** | **`31.530 ms`** | **`14.94×` slower!** | **`4.36 TFLOPS`** (eff. FP64) | `123` HLO lines, `3` `remainder` ops + signed-fixup bitmasks — **TPU VPU has no fast hardware `INT32` divider!** |
| **3. Float32 Reciprocal Barrett (`c - floor(c/m)*m`)** | **`2.911 ms`** | **`1.38×`** | **`47.22 TFLOPS`** (eff. FP64) | `66` HLO lines, `0` `remainder` ops — **`10.83×` faster than `jnp.remainder`** and **`46.7×` faster than XLA's `TwoSum` FP64**! |
| *Reference: Native `FP32 HIGHEST`* | `1.129 ms` | — | `121.69 TFLOPS` (FP32) | Multi-pass BF16 decomposition. |

**Plain-English lesson:** One innocent line of Python—`jnp.remainder(C_i32, mods)`—turns a `2.11 ms` matrix multiply into a `31.53 ms` stall (`14.94×` slower!) because the TPU's Finishing Bench (VPU) was built for floating-point vector math, not integer division. Replacing `% m` with `c - floor(c * (1.0 / m)) * m` in `float32` (exact whenever `|C_i32| < 2^24`) moves the work onto the VPU's native float pipes and recovers **`10.83×`** instantaneously.

### 6.3 Discovery 3, 4 & 5: HBM Bandwidth, Contraction Alignment (`K=4097`), and Pallas `VMEM` Stack OOM

- **Streaming HBM Bandwidth (`512 MiB` RW copy):** **`1,076.0 GB/s`** (`0.499 ms`).
- **The `125 µs` Launch & Weight-Load Floor:** Sweeping batch size `M = 1` through `M = 256` on a `4096×4096` BF16 matmul keeps wall time flat at **`0.124–0.138 ms`** (`M=1` achieves `0.24 TFLOPS` / `243.9 GB/s`). Compute scaling only lifts off above `M = 512` (`121.47 TFLOPS`), climbing to `328.64 TFLOPS` at `M = 2048`.
- **The Contraction-Axis (`K=4097`) Alignment Cliff:** TPUs tile memory into **`(8, 128)`** sublane-by-lane chunks (`T(8,128)(2,1)` for BF16). Against aligned `4096×4096×4096` (`488.58 TFLOPS`, `0.2813 ms`), adding 1 extra element to `M` (`4097`) or `N` (`4097`) costs less than `1.6%`—**but adding 1 extra element to the inner contraction dimension `K = 4097` drops throughput `-14.9%` to `415.82 TFLOPS` (`0.3306 ms`)** because it forces an entire extra padded `K`-tile pass through the MXU!
- **Live Pallas (`jax.experimental.pallas.tpu`) `VMEM` Tile Sweep (`4096³` BF16):** Writing a 12-line custom Pallas kernel and sweeping tile sizes exposes a **`38.3×` performance range** followed by a hard hardware wall:

| Pallas Tile `(BM, BN, BK)` | Est. Double-Buffered VMEM | Wall Time | Achieved TFLOPS | What Happens on Silicon |
|---|---:|---:|---:|---|
| `(128, 128, 128)` | `224 KB` | `14.179 ms` | **`9.69 TFLOPS`** | Tiny tiles starve Trillium's `256×256` MXU & DMA queue (`38.3×` penalty). |
| `(256, 256, 256)` | `896 KB` | `2.556 ms` | `53.76 TFLOPS` | Matches one MXU tile, still dominated by DMA/loop overhead. |
| `(512, 512, 256)` | `2.5 MiB` | `0.952 ms` | `144.31 TFLOPS` | DMA prefetch begins overlapping compute. |
| `(512, 512, 512)` | `3.5 MiB` | `0.724 ms` | `189.83 TFLOPS` | Mosaic `tpu_custom_call` (`8` HLO lines). |
| `(1024, 1024, 512)` | `10.0 MiB` | `0.408 ms` | `336.74 TFLOPS` | Approaching XLA compiler speed. |
| **`(1024, 1024, 1024)`** | **`14.0 MiB`** | **`0.370 ms`** | **`371.24 TFLOPS`** | **`38.3×` faster than `128³`; reaches `76%` of tuned XLA in 12 lines of Pallas.** |
| **`(2048, 2048, 512)`** | **`32.0 MiB`** | — | **`RESOURCE_EXHAUSTED`** | **Hard VMEM stack OOM (`bf16[4096,4096]{1,0:T(8,128)(2,1)}`).** |

Combined with XLA's own `used_scoped_memory_configs` (`24.15–27.40 MiB`), that live `RESOURCE_EXHAUSTED` cliff empirically brackets `TPU v6 lite`'s usable single-core `VMEM` stack budget strictly **below `32 MiB`**.

---

## 7. The Self-Audit: Ten Silent Bugs We Caught in Our Own Tool (v1 → v2)

Whenever you build a large cross-architecture database or compiler graph, the most dangerous bugs are not crashes—they are **silent omissions** that still return plausible-looking answers. Before publishing a single finding above, we turned our own Redundancy Detector and Carbon Critic loose on **KernelKnievel v1** (`11,415` nodes / `52,859` edges). They caught **ten real defects**:

1. **An unordered `SQL LIMIT 1200` wiped out 100% of AMD RDNA consumer GPUs.** Because CDNA rows happened to appear first in SQLite, `chip:AMD_RDNA1` through `chip:AMD_RDNA4` had **zero nodes** in our v1 graph.
2. **A second `SQL LIMIT 400` wiped out 100% of Huawei Ascend hardware ops and CATLASS templates.** Both `davinci_hw` (`19` core hardware ops including `MMAD` and `FIXPIPE`) and `catlass` (`672` kernel ops) silently vanished.
3. **A one-line loop guard (`if src == dst: return`) dropped all 7 Ascend self-pipe barriers.** Self-pipe `PipeBarrier` rules (`49` total, only `42` loaded) are critical for preventing hazards inside a single execution pipe.
4. **A Python slice `[:6]` silently chopped Blackwell off NVIDIA PTX ops.** Because PTX instructions list oldest-to-newest targets (`sm_70, sm_75, ... sm_120a`), slicing the first 6 erased `sm_90`, `sm_110f`, and `sm_120a/f` from 21 core PTX ops.
5. **84 of 242 (`34.7%`) capability links pointed to phantom or mismatched instruction IDs.** That included a typo (`cuda:sass:UTMLDG` instead of `UTMALDG`) and false-positive FP4 claims attached to Ascend 910B and Apple Metal.
6. **33 nodes got mislabeled as `instruction` instead of `ir_op` or `hw_pipe`** because capability edges were registered *before* mining the real SQLite tables (plus a bogus `HMMA --evolves_to--> OMMA` edge).
7. **309 NVIDIA SM100 latency edges sat on a disconnected island** (using lowercase `'reg'` instead of `'GPR'`), while WGSL (`172` built-ins), TPU Pallas (`20` docs), Metal 4.1 (`80` specs), Intel `uops.info` (`216,382` rows), and RISC-V CSRs (`462`) were never mined into the graph at all.
8. **Hub-node leakage poisoned graph search and PageRank.** `find_bridges()` jumped trivially through generic `arch:*` nodes and ARM's `EndOfDecode` token (`degree 2,036`), while ARM pseudocode absorbed **`25.07%`** of total PageRank vs **`0.10%`** for all 24 optimizations combined.
9. **Stale folklore leaked into our own Atlas:** Our v1 `optimizations.json` repeated the internet myth of `~32 MB` Apple ANE SRAM even though our own `metal_kb.sqlite` receipt proved `HAL[0x1b8] = 2 MB`.
10. **Spawning 10 subprocesses per query made federated search sluggish (`250–400 ms`).**

### How KernelKnievel v2 Fixed Every Single One (Verified Receipt)
- **Mine first, assert zero phantoms:** `build_isa_graph.py` now mines all 10 KBs with stratified per-chip queries first, then runs a **hard build-time zero-phantom assertion** (`phantom_primitives_count == 0`). If a single capability points to a typo or nonexistent opcode, the build refuses to succeed.
- **Complete, connected coverage (`1.31s` atomic rebuild):** `11,820` nodes, `48,174` edges, `0` phantoms, `10/10` AMD chips, `49/49` Ascend sync rules, `324` connected SM100 RAW latency edges, Intel `uops.info` port/cycle summaries, WGSL, TPU Pallas, MSL 4.1, RISC-V CSRs, and live Cloud TPU `v6e-1` Trillium empirical receipts (`rcpt-58540369`, `rcpt-58542640`).
- **Balanced Semantic PageRank & clean chip-granular tools:** `pseudocode = 0.0`, `arch = 0.0`; new `isa_graph_locality_path` (Class A/B/C epilogue spill detector) and `isa_fsm_verify_schedule` (static bare-metal hazard checker).
- **In-process read-only SQLite pooling:** Cuts 10-KB federated search from `~300 ms` down to **`17.4 ms`**, verified across `6/6` harness tests and `20/20` live `mcp.client.stdio` tools + `5/5` resources + atomic hot-reload (`phenomenon0/KernelKnievel`).

---

## 8. Closing Takeaway

Portable AI software does not break because hardware vendors refuse to agree on instruction mnemonics. It breaks because our mental models and compilers group chips by **brand labels** instead of **physical silicon contracts**:

- Whether the Holding Tray has an on-chip doorway to the Finishing Bench (Class A/B) or spills back to the Warehouse (Class C).
- Whether the Ticket System waits out-of-order on named tokens or drains an in-order FIFO line.
- Whether the Finishing Bench actually has a hardware integer divider—or needs a float32 reciprocal rewrite to avoid a `14.94×` stall.
- Where a compression or emulation stunt crosses its exact roofline kill-switch and flips slower than simple native math.

Model those cliffs honestly at **chip revision granularity**, enforce zero-phantom self-audits on your own tooling, and the two durable state machines—double-buffered phase-parity DMA and explicitly typed scoreboards—carry cleanly across every accelerator die through 2031.

---

### Reproducibility & Verification Receipts
- **10 Modular Hardware KBs (`495.7 MiB` SQLite, `106/106` modular tests passing):** `arm-kb`, `cuda-kb`, `metal-kb`, `intel-kb`, `amd-kb`, `mobile-gpu-kb`, `ascend-kb`, `accel-kb`, `riscv-kb`, `spirv-wgsl-kb`.
- **Knowledge Graph v2 (`isa_graph.sqlite`, `24.88 MB`):** `11,820` nodes across 18 kinds, `48,174` edges across 25 semantic relations, `0` phantoms, `1.31s` rebuild.
- **Live Cloud TPU `v6e-1` Trillium Receipt:** `/home/omen/isa-kb/receipts/receipt_tpu_v6e_silicon_probe.json` (`2026-12-03T00:35:08Z`, `asia-northeast1-b`, `TPU v6 lite`, `jax 0.6.2`; ledger entries `rcpt-58540369` & `rcpt-58542640`).
- **Optimization Atlas v2.0.0 (`optimizations.json`):** `24` patterns × `10` architectures = `240` per-chip mappings, `12` canonical families, structured roofline kill-switches, `35`-paper INT4/INT8/FP4 → FP64/INT64 monograph.
