interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

docs: correct current provenance and stack legend layout

merged 99f526e3c526b5fe #132 · opened 2026-10-27 05:39 UTC · closed 2026-10-29 01:33 UTC · merged 2026-10-29 01:33 UTC

Imported from GitHub aien-dev/CUDApp#132, by drakestapleton

Labels: ready-to-merge

Base 67f3135ef88d8f520dfc15a2b2bc3264f53f0d6a · Head b3d1a33e5d87257004fd99a5e81d13c583fb34e2

Merged on GitHub as 682e73c5aea9d198f22ef3dca70d3e4f8cdbd105; reachable from main 21d8de285f713adf09e0d6ba6db2b37139d0674e (observed 2026-11-18T16:38:28Z)

drakestapleton wrote on 2026-10-27 05:39 UTC

Published-head CI

All checks are green for b3d1a33e5d87257004fd99a5e81d13c583fb34e2: 10 successful check rows across 6 completed workflows. The native ARM64 host-suite job completed successfully at 2026-10-27 05:50:38 UTC and its log ends with CUDA++ HOST TESTS PASS (39 targets). Library build, runtime API, hello-simulator, drift, SBOM and CodeQL checks also succeeded. These are host-only results, not GPU qualification. The local x86_64 build limits below remain accurately recorded.

Published head: b3d1a33e5d87257004fd99a5e81d13c583fb34e2. Native GitHub publication preserved the complete verified tree (e2ea7c4da92d45c553784d0881fee9bce938f3f9); only commit metadata differs from local Git. See evidence/docs-current-contract-published-20261027/ for the authoritative local-to-published mapping.

Evidence and limits

Rebased on 67f3135ef88d8f520dfc15a2b2bc3264f53f0d6a; tested source/receipt head 865c4d22c01d4af9ce6e2108268557e23db7ff22. Linux x86_64, host-only.

  • Rendered legend test: original generator fails on overlapping items; repaired generator and deliberate-overlap negative control pass. Fresh rebase run: both tests pass.
  • python3 tools/figures/make_figures.py --check: figures current: 10.
  • Before/after Inkscape crops inspected. Only four legend x-coordinate attributes change in the SVG; all labels and dimensions are preserved.
  • Syntax, Markdown, whitespace and patch-level secret/private-pattern checks pass.
  • Independent source and receipt reviews found no remaining issues; independent rebase review confirmed both patches are unchanged.
  • Local make OUT_DIR=build/docs-rebase test and build exit 2: x86_64 rejects unchanged AArch64 barriers in omega_blackwell_engine.c:393/:558 and, in the parallel build, omega_blackwell_submit.c:284/:377/:541/:622. The local full suite did not pass. No gate, barrier or compiler flag was changed. Native ARM64 CI is separate evidence.

Receipts: evidence/docs-current-contract-20261027/ and evidence/docs-current-contract-rebased-20261027/. The publication mapping in evidence/docs-current-contract-published-20261027/ supersedes the local commit IDs in both earlier receipts.

Change

  • Space the stack legend so the longer first-party licence label no longer overlaps the following swatch/text. Add an Inkscape regression and negative control.
  • Correct PROVENANCE: the trace-emitter runner requires nvdisasm, unlike the optional C reconvergence/artifact checks.
  • Correct residual present-tense listing claims after #93 removed the fixture; retain its #84/#93 history and avoid duplicating #98's corrections.
  • Qualify L401's kernel-module replacement scope as pending a separate decision. Preserve the supported NVIDIA open-module path and leave swap behavior untouched.

Refs #104, #110, #126, #93 and #98. Owner inventory found no overlapping open repair. No runtime, driver, kernel, swap, licensing, security-setting or architecture change.

Not run here

GPU/chip tests, the trace-emitter runner and native ARM64 execution. No hardware access, installation, merge or deployment occurred. This PR is open for normal review; no merge or auto-merge is requested.

Apply it

git checkout -b patch-99f526e3c526b5fe 67f3135ef88d8f520dfc15a2b2bc3264f53f0d6a
curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/99f526e3c526b5fe.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/CUDApp
132
b3d1a33e5d87257004fd99a5e81d13c583fb34e2
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":132,"url":"https://github.com/aien-dev/CUDApp/pull/132","export_sha256":"0aafd51b77ff5776d6baaf9b88b48c8b36a6e27c8d829ae8ded561b71712b17a","imported_utc":"2026-11-18T16:38:28Z"}

Changes

diff --git a/AGENTS.md b/AGENTS.md
index 4e8ef444..b1d324df 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -43,6 +43,7 @@ make zero-cuda-gate           # the built programs need no CUDA library (self-te
 make doctor                   # is this machine ready? reads /proc, /sys and /dev only
 build/hello_gpu --sim         # the first kernel on the host warp simulator
 python3 tools/figures/make_figures.py --check   # README figures match the code
+python3 tools/figures/test_stack_legend.py -v   # rendered legend check; needs Inkscape
 ```
 
 - Judge `make test` by its exit code and its last line, `CUDA++ HOST TESTS PASS (<count> targets)`, where `<count>` is computed from the current `HOST_TESTS` manifest in `Makefile`. The log contains many `FAIL` and `ERROR` lines by design (mutation tests and negative controls that must fail). Do not grep the log for them.
@@ -65,7 +66,7 @@ make hello-gpu                              # runs make doctor, then examples/he
 - Write the test first and watch it fail for the expected reason; include a negative control. A library change also needs a host reference, a simulator run where the simulator covers it, a mutation test and a chip receipt.
 - A failing test means the work is wrong. Never skip, loosen or rerun a test until it passes once.
 - Every instruction encoding has golden words in the tests and a chip run behind it. Do not change an encoder field without both.
-- No NVIDIA binary, cubin, PTX, firmware or listing printed by NVIDIA's tools goes in this repository (`docs/AUDIT.md`). The one exception is a regression pin of our own words, recorded in `PROVENANCE.md` section 6; the rules for allowed sources are in `PROVENANCE.md`. If you used NVIDIA's compiler or disassembler on your own small kernels to learn an encoding, say so in a code comment.
+- No NVIDIA binary, cubin, PTX, firmware or listing printed by NVIDIA's tools goes in this repository (`docs/AUDIT.md`). The former trace-emitter regression pin was removed in #93; its history is recorded in `PROVENANCE.md` section 6. The rules for allowed sources are in `PROVENANCE.md`. If you used NVIDIA's compiler or disassembler on your own small kernels to learn an encoding, say so in a code comment.
 - The runtime API is versioned. `docs/runtime/omega_runtime_api.manifest` is checked against the C headers it names and against `docs/runtime/API.md` by `make test` (`test-runtime-api`, with negative controls). Change a public header, the manifest and `API.md` together.
 - Status words in `README.md` and `ROADMAP.md` are PASS (receipt on a named commit), PARTIAL, MISSING, BUILDING. Do not upgrade a status without the receipt.
 - New source files carry `SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception`. Keep third-party notices (`THIRD_PARTY.md`, `NOTICE`).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3903ad82..425c869b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -58,7 +58,7 @@ CUDA++'s libraries (matrix multiply, attention, elementwise, mixture-of-experts
 
 The current first-party license is Apache-2.0 WITH LLVM-exception. You may read, disassemble, reverse engineer and translate CUDA++ output, including its machine code, and port CUDA++ to any hardware, subject to the applicable license and retained third-party notices. This is deliberate: CUDA's license restricts reverse engineering its output to target other hardware (`docs/PAIN_POINTS.md`, section 2.8); CUDA++ does not impose that restriction on its own output.
 
-Do not send us NVIDIA's code or binaries. CUDA++ stores no NVIDIA binary, cubin, PTX or firmware. The only listing printed by an NVIDIA tool is a test pin of our own words, recorded in `PROVENANCE.md` section 6 (`docs/AUDIT.md`). If you used NVIDIA's compiler or disassembler on your own small kernels to learn an encoding, say so in the code comment, as the existing code does (`docs/HOW_I_DID_IT.md`, step 2).
+Do not send us NVIDIA's code or binaries. CUDA++ stores no NVIDIA binary, cubin, PTX, firmware or NVIDIA-tool listing in the current tree. The former trace-emitter test pin of our own words was removed in #93; its history is recorded in `PROVENANCE.md` section 6 (`docs/AUDIT.md`). If you used NVIDIA's compiler or disassembler on your own small kernels to learn an encoding, say so in the code comment, as the existing code does (`docs/HOW_I_DID_IT.md`, step 2).
 
 ## How a change gets in
 
diff --git a/PROVENANCE.md b/PROVENANCE.md
index 2a85b56c..d6be22f0 100644
--- a/PROVENANCE.md
+++ b/PROVENANCE.md
@@ -78,7 +78,7 @@ is listed in section 6.
 | Instruction latencies, QMD, dispatch order | `src/omega_gpu_elementwise_api.c`, `src/omega_gpu_cmdlist.c` | A | Mesa `sm120_instr_latencies.rs`, `qmd.rs`, `nvk_cmd_dispatch.c` (MIT). |
 | Tensor-core arithmetic model | `tests/gpu_tc_probe_test.c`, `tests/bw_hmma_model.h` | A (chip) | Fitted on chip outputs. |
 | cubin container writer | `src/omega_cubin.c`, `src/omega_cubin.h` | B | Layout read from a `ptxas 13.0.88 -arch=sm_121` reference output with `readelf`/`cuobjdump -elf` (the source does not name the probe input; the next change to the file records it). Header constants are also public in LLVM `ELF.h` (class A). No bytes copied. |
-| Decode cross-checks | `tests/gpu_reconv_test.c`, `tests/device-trace/run-emitter-checks.sh`, `tools/artifact_smoke.sh` | B | `nvdisasm`/`cuobjdump` read our own bytes; skipped when not installed. |
+| Decode cross-checks | `tests/gpu_reconv_test.c`, `tests/device-trace/run-emitter-checks.sh`, `tools/artifact_smoke.sh` | B | `nvdisasm`/`cuobjdump` read our own bytes. `gpu_reconv_test.c` and `artifact_smoke.sh` skip unavailable tools; `run-emitter-checks.sh` requires `nvdisasm` on `PATH`. |
 
 No source comment or record in this repository says a fact was obtained by disassembling an NVIDIA
 library, driver or firmware. A fact found to have such an origin is removed and re-derived from class A
diff --git a/README.md b/README.md
index b8d7b149..7e3f243b 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ I'm not the only one mapping this instruction set in the open, and I credit the
 
 <p align="center"><img src="docs/img/reverse-engineering.svg" width="100%" alt="The method in eight steps. Learn: my own probe kernel, nvcc once offline, read the bytes back, change one detail. Prove: field hypothesis, my encoder writes it, the GB10 runs it, golden words in the tests. A wrong answer goes back to the hypothesis."></p>
 
-No NVIDIA binary is in this repository. One listing printed by NVIDIA's `nvdisasm` is stored as a test pin: the decode of CUDA++'s own trace-emitter words (`PROVENANCE.md` section 6). The whole method, step by step with the files and receipts: [docs/HOW_I_DID_IT.md](docs/HOW_I_DID_IT.md).
+No NVIDIA binary or NVIDIA-tool listing is stored in the current tree. The former `nvdisasm` test pin of CUDA++'s own trace-emitter words was removed in #93; its history is recorded in `PROVENANCE.md` section 6. The whole method, step by step with the files and receipts: [docs/HOW_I_DID_IT.md](docs/HOW_I_DID_IT.md).
 
 ### What the machine code looks like
 
@@ -357,7 +357,7 @@ work: 12582912 bytes moved (8388608 read, 4194304 written), 1048576 floating-poi
 
 Receipt: `evidence/dx/d3-faults/hello-sim-spark.txt`; the ceiling, `evidence/OWN30B-T3-TC-PEAK-BW-5faa0f70-20261013T2236Z/`. **FIXED on the simulator.** Left: the measured GPU time printed next to the floor, from a chip run (the code prints it; it has not run on the chip yet).
 
-Replacing a developer's CUDA libraries and NVIDIA's kernel module with CUDA++ is ledger item L401; its section here comes with it.
+The developer replacement workflow is ledger item L401. Its kernel-module replacement scope is pending a separate kernel decision; the supported path here retains NVIDIA's open kernel module.
 
 ## Run your first kernel
 
diff --git a/docs/HOW_I_DID_IT.md b/docs/HOW_I_DID_IT.md
index dc8daa17..f0ec0609 100644
--- a/docs/HOW_I_DID_IT.md
+++ b/docs/HOW_I_DID_IT.md
@@ -32,7 +32,7 @@ The headers say what each call takes. What they do not say I learned on the chip
 
 NVIDIA does not publish the instruction encoding of its GPUs. Its public assembly language, PTX, is a virtual one; the real machine code (SASS) is undocumented. I worked it out from three sources and checked every result against the chip:
 
-1. **NVIDIA's own tools as an offline oracle.** I wrote small CUDA C++ probe kernels of my own, compiled them once with `nvcc 13.0.88 -arch=sm_121 -cubin`, and printed the machine code with `cuobjdump -sass`. Each instruction comes out as 16 bytes next to its mnemonic. Comparing kernels that differ in one detail (a register number, an immediate, a predicate, a modifier) shows which bits encode what. The source code says where this was done: `src/omega_blackwell_codegen.h`, `src/omega_blackwell_codegen.c`, `src/omega_blackwell_codegen_tc.c` and `src/omega_blackwell_codegen_qmma.h` cite the nvcc output they match. These tools are never run by CUDA++ itself; no NVIDIA binary is stored in this repository, and the only stored NVIDIA-tool listing is the `nvdisasm` decode of our own trace-emitter words (`PROVENANCE.md` section 6; `docs/AUDIT.md` section 5).
+1. **NVIDIA's own tools as an offline oracle.** I wrote small CUDA C++ probe kernels of my own, compiled them once with `nvcc 13.0.88 -arch=sm_121 -cubin`, and printed the machine code with `cuobjdump -sass`. Each instruction comes out as 16 bytes next to its mnemonic. Comparing kernels that differ in one detail (a register number, an immediate, a predicate, a modifier) shows which bits encode what. The source code says where this was done: `src/omega_blackwell_codegen.h`, `src/omega_blackwell_codegen.c`, `src/omega_blackwell_codegen_tc.c` and `src/omega_blackwell_codegen_qmma.h` cite the nvcc output they match. These tools are never run by CUDA++ itself; no NVIDIA binary or NVIDIA-tool listing is stored in the current tree. The former `nvdisasm` test pin of our own trace-emitter words was removed in #93 (`PROVENANCE.md` section 6; `docs/AUDIT.md` section 5).
 2. **Mesa's open NVIDIA compiler.** Mesa's NAK compiler (MIT) encodes NVIDIA instructions for its Vulkan driver, so its source records many opcodes and bit positions (`nak/sm70_encode.rs`), instruction latencies (`nak/sm120_instr_latencies.rs`) and the launch descriptor layout (`nak/qmd.rs`). I cite it wherever I used a fact from it and copied no code (`THIRD_PARTY.md`). Where nvcc and NAK disagree for sm_121, I follow what nvcc emits and say so in a comment.
 3. **The chip itself.** An encoding is only believed once the GPU runs it and gives the right answer. For arithmetic that is not exactly specified I ran probe kernels and fitted a model to the results: the tensor-core BF16 multiply-accumulate was characterised on 2,048 cases chosen to separate candidate models, until one model matched every output bit for bit (`tests/gpu_tc_probe_test.c`, `tests/bw_hmma_model.h`). The warp simulators the host tests run (`tests/bw_warp_sim*.h`) model the special-function unit the same way, flushing subnormals as the GB10 does.
 
diff --git a/docs/img/stack.svg b/docs/img/stack.svg
index 43bfb767..06653556 100644
--- a/docs/img/stack.svg
+++ b/docs/img/stack.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="930" viewBox="0 0 1200 930" role="img" aria-labelledby="t d"><title id="t">CUDA and CUDA++, layer by layer</title><desc id="d">Left: the NVIDIA CUDA stack. Right: CUDA++. The four closed layers above the kernel module are replaced by my own code; the open kernel module and the signed GPU firmware are still NVIDIA&#x27;s.</desc><defs><radialGradient id="glow" cx="22%" cy="-10%" r="85%"><stop offset="0" stop-color="#2d7ff9" stop-opacity="0.16"/><stop offset="0.55" stop-color="#2d7ff9" stop-opacity="0.03"/><stop offset="1" stop-color="#2d7ff9" stop-opacity="0"/></radialGradient><radialGradient id="glow2" cx="92%" cy="8%" r="45%"><stop offset="0" stop-color="#00e599" stop-opacity="0.08"/><stop offset="1" stop-color="#00e599" stop-opacity="0"/></radialGradient><marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="#94a3b8"/></marker></defs><rect x="0.5" y="0.5" width="1199.0" height="929.0" rx="22" fill="#08090c" stroke="#1c2536" stroke-width="1.0"/><rect x="0.5" y="0.5" width="1199.0" height="929.0" rx="22" fill="url(#glow)" stroke="none" stroke-width="1.0"/><text x="48.0" y="60.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="14" font-weight="600" fill="#7db4ff" text-anchor="start" letter-spacing="1.5">THE STACK</text><text x="48.0" y="100.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="30" font-weight="800" fill="#f1f5f9" text-anchor="start" letter-spacing="-0.5">What runs between your program and the GPU</text><text x="48.0" y="150.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="22" font-weight="700" fill="#94a3b8" text-anchor="start">CUDA</text><text x="664.0" y="150.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="22" font-weight="700" fill="#00e599" text-anchor="start">CUDA++</text><rect x="48.0" y="172.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="204.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Your program</text><text x="70.0" y="228.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">CUDA C++ kernels and host code</text><rect x="664.0" y="172.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1"/><text x="686.0" y="204.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Your program</text><text x="686.0" y="228.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">C calls to the kernel builder; Omega&#x27;s languages next (bar C1)</text><rect x="48.0" y="258.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="290.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">nvcc · NVVM · PTX · ptxas</text><text x="70.0" y="314.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">compiler, closed</text><rect x="664.0" y="258.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="290.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Kernel builder · allocator · sm_121 encoder</text><text x="686.0" y="314.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_blackwell_codegen*.c, _encoder.c, _qmd.c</text><line x1="540.0" y1="294.0" x2="556.6" y2="294.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="294.0" x2="654.0" y2="294.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="298.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="344.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="376.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">cuBLAS · cuDNN · CUB</text><text x="70.0" y="400.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">maths libraries, closed</text><rect x="664.0" y="344.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="376.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Matmul · attention · MoE · reductions</text><text x="686.0" y="400.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_gpu_*_api.c</text><line x1="540.0" y1="380.0" x2="556.6" y2="380.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="380.0" x2="654.0" y2="380.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="384.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="430.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="462.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">libcudart</text><text x="70.0" y="486.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">runtime API, closed</text><rect x="664.0" y="430.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="462.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Session · command lists · job engine</text><text x="686.0" y="486.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_gpu_session.c, _cmdlist.c, _engine.c</text><line x1="540.0" y1="466.0" x2="556.6" y2="466.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="466.0" x2="654.0" y2="466.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="470.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="516.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="548.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">libcuda</text><text x="70.0" y="572.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">driver API, closed</text><rect x="664.0" y="516.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="548.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Driver client: nvrm + m16</text><text x="686.0" y="572.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">nvrm/nvrm.c, m16/: ioctls from the open headers</text><line x1="540.0" y1="552.0" x2="556.6" y2="552.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="552.0" x2="654.0" y2="552.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="556.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><line x1="36.0" y1="610.0" x2="1164.0" y2="610.0" stroke="#64748b" stroke-width="1" stroke-dasharray="6 6"/><rect x="502.0" y="599.0" width="196.0" height="22.0" rx="0.0" fill="#08090c" stroke="none" stroke-width="1.0"/><text x="600.0" y="615.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="400" fill="#94a3b8" text-anchor="middle">user space ↑   kernel ↓</text><rect x="48.0" y="632.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2d7ff9" stroke-width="1.0"/><text x="70.0" y="664.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">nvidia.ko · nvidia-uvm.ko</text><text x="70.0" y="688.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA&#x27;s open kernel module</text><rect x="664.0" y="632.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2d7ff9" stroke-width="1"/><text x="686.0" y="664.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">nvidia.ko · nvidia-uvm.ko</text><text x="686.0" y="688.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">stays; GB10 support goes upstream to Nova, nouveau</text><line x1="540.0" y1="668.0" x2="569.5" y2="668.0" stroke="#a78bfa" stroke-width="1.6" opacity="0.8"/><line x1="630.5" y1="668.0" x2="654.0" y2="668.0" stroke="#a78bfa" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12.0" fill="#a78bfa" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12.0" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.7"/><text x="600.0" y="672.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#a78bfa" text-anchor="middle">stays</text><rect x="48.0" y="718.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#f59e0b" stroke-width="1.0"/><text x="70.0" y="750.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">GSP firmware</text><text x="70.0" y="774.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">runs inside the GPU, signed by NVIDIA</text><rect x="664.0" y="718.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#f59e0b" stroke-width="1"/><text x="686.0" y="750.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">GSP firmware</text><text x="686.0" y="774.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">stays NVIDIA&#x27;s: the chip checks its signature</text><line x1="540.0" y1="754.0" x2="569.5" y2="754.0" stroke="#f59e0b" stroke-width="1.6" opacity="0.8"/><line x1="630.5" y1="754.0" x2="654.0" y2="754.0" stroke="#f59e0b" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12.0" fill="#f59e0b" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12.0" fill="none" stroke="#f59e0b" stroke-width="1" opacity="0.7"/><text x="600.0" y="758.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#f59e0b" text-anchor="middle">stays</text><rect x="48.0" y="804.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="836.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">NVIDIA GB10 GPU</text><text x="70.0" y="860.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">DGX Spark, sm_121</text><rect x="664.0" y="804.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1"/><text x="686.0" y="836.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">NVIDIA GB10 GPU</text><text x="686.0" y="860.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">DGX Spark, sm_121</text><rect x="48.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#64748b" stroke-width="1.5"/><text x="70.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">closed, replaced by CUDA++</text><rect x="300.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0b1a17" stroke="#00e599" stroke-width="1.5"/><text x="322.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">first-party, Apache-2.0+LLVM</text><rect x="440.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#2d7ff9" stroke-width="1.5"/><text x="462.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA open source, stays</text><rect x="740.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#f59e0b" stroke-width="1.5"/><text x="762.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA signed firmware, stays</text></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="930" viewBox="0 0 1200 930" role="img" aria-labelledby="t d"><title id="t">CUDA and CUDA++, layer by layer</title><desc id="d">Left: the NVIDIA CUDA stack. Right: CUDA++. The four closed layers above the kernel module are replaced by my own code; the open kernel module and the signed GPU firmware are still NVIDIA&#x27;s.</desc><defs><radialGradient id="glow" cx="22%" cy="-10%" r="85%"><stop offset="0" stop-color="#2d7ff9" stop-opacity="0.16"/><stop offset="0.55" stop-color="#2d7ff9" stop-opacity="0.03"/><stop offset="1" stop-color="#2d7ff9" stop-opacity="0"/></radialGradient><radialGradient id="glow2" cx="92%" cy="8%" r="45%"><stop offset="0" stop-color="#00e599" stop-opacity="0.08"/><stop offset="1" stop-color="#00e599" stop-opacity="0"/></radialGradient><marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="#94a3b8"/></marker></defs><rect x="0.5" y="0.5" width="1199.0" height="929.0" rx="22" fill="#08090c" stroke="#1c2536" stroke-width="1.0"/><rect x="0.5" y="0.5" width="1199.0" height="929.0" rx="22" fill="url(#glow)" stroke="none" stroke-width="1.0"/><text x="48.0" y="60.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="14" font-weight="600" fill="#7db4ff" text-anchor="start" letter-spacing="1.5">THE STACK</text><text x="48.0" y="100.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="30" font-weight="800" fill="#f1f5f9" text-anchor="start" letter-spacing="-0.5">What runs between your program and the GPU</text><text x="48.0" y="150.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="22" font-weight="700" fill="#94a3b8" text-anchor="start">CUDA</text><text x="664.0" y="150.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="22" font-weight="700" fill="#00e599" text-anchor="start">CUDA++</text><rect x="48.0" y="172.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="204.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Your program</text><text x="70.0" y="228.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">CUDA C++ kernels and host code</text><rect x="664.0" y="172.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1"/><text x="686.0" y="204.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Your program</text><text x="686.0" y="228.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">C calls to the kernel builder; Omega&#x27;s languages next (bar C1)</text><rect x="48.0" y="258.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="290.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">nvcc · NVVM · PTX · ptxas</text><text x="70.0" y="314.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">compiler, closed</text><rect x="664.0" y="258.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="290.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Kernel builder · allocator · sm_121 encoder</text><text x="686.0" y="314.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_blackwell_codegen*.c, _encoder.c, _qmd.c</text><line x1="540.0" y1="294.0" x2="556.6" y2="294.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="294.0" x2="654.0" y2="294.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="282.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="298.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="344.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="376.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">cuBLAS · cuDNN · CUB</text><text x="70.0" y="400.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">maths libraries, closed</text><rect x="664.0" y="344.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="376.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Matmul · attention · MoE · reductions</text><text x="686.0" y="400.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_gpu_*_api.c</text><line x1="540.0" y1="380.0" x2="556.6" y2="380.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="380.0" x2="654.0" y2="380.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="368.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="384.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="430.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="462.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">libcudart</text><text x="70.0" y="486.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">runtime API, closed</text><rect x="664.0" y="430.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="462.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Session · command lists · job engine</text><text x="686.0" y="486.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">src/omega_gpu_session.c, _cmdlist.c, _engine.c</text><line x1="540.0" y1="466.0" x2="556.6" y2="466.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="466.0" x2="654.0" y2="466.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="454.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="470.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><rect x="48.0" y="516.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="548.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#64748b" text-anchor="start" text-decoration="line-through">libcuda</text><text x="70.0" y="572.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#64748b" text-anchor="start">driver API, closed</text><rect x="664.0" y="516.0" width="488.0" height="72.0" rx="16.0" fill="#0b1a17" stroke="#00e599" stroke-width="1.4"/><text x="686.0" y="548.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">Driver client: nvrm + m16</text><text x="686.0" y="572.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13.5" font-weight="400" fill="#94a3b8" text-anchor="start">nvrm/nvrm.c, m16/: ioctls from the open headers</text><line x1="540.0" y1="552.0" x2="556.6" y2="552.0" stroke="#00e599" stroke-width="1.6" opacity="0.8"/><line x1="643.4" y1="552.0" x2="654.0" y2="552.0" stroke="#00e599" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12.0" fill="#00e599" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="556.6" y="540.0" width="86.8" height="24.0" rx="12.0" fill="none" stroke="#00e599" stroke-width="1" opacity="0.7"/><text x="600.0" y="556.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#00e599" text-anchor="middle">replaced</text><line x1="36.0" y1="610.0" x2="1164.0" y2="610.0" stroke="#64748b" stroke-width="1" stroke-dasharray="6 6"/><rect x="502.0" y="599.0" width="196.0" height="22.0" rx="0.0" fill="#08090c" stroke="none" stroke-width="1.0"/><text x="600.0" y="615.0" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="400" fill="#94a3b8" text-anchor="middle">user space ↑   kernel ↓</text><rect x="48.0" y="632.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2d7ff9" stroke-width="1.0"/><text x="70.0" y="664.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">nvidia.ko · nvidia-uvm.ko</text><text x="70.0" y="688.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA&#x27;s open kernel module</text><rect x="664.0" y="632.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2d7ff9" stroke-width="1"/><text x="686.0" y="664.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">nvidia.ko · nvidia-uvm.ko</text><text x="686.0" y="688.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">stays; GB10 support goes upstream to Nova, nouveau</text><line x1="540.0" y1="668.0" x2="569.5" y2="668.0" stroke="#a78bfa" stroke-width="1.6" opacity="0.8"/><line x1="630.5" y1="668.0" x2="654.0" y2="668.0" stroke="#a78bfa" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12.0" fill="#a78bfa" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="569.5" y="656.0" width="61.0" height="24.0" rx="12.0" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.7"/><text x="600.0" y="672.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#a78bfa" text-anchor="middle">stays</text><rect x="48.0" y="718.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#f59e0b" stroke-width="1.0"/><text x="70.0" y="750.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">GSP firmware</text><text x="70.0" y="774.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">runs inside the GPU, signed by NVIDIA</text><rect x="664.0" y="718.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#f59e0b" stroke-width="1"/><text x="686.0" y="750.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">GSP firmware</text><text x="686.0" y="774.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">stays NVIDIA&#x27;s: the chip checks its signature</text><line x1="540.0" y1="754.0" x2="569.5" y2="754.0" stroke="#f59e0b" stroke-width="1.6" opacity="0.8"/><line x1="630.5" y1="754.0" x2="654.0" y2="754.0" stroke="#f59e0b" stroke-width="1.6" marker-end="url(#arrow)" opacity="0.8"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12" fill="#08090c" stroke="none" stroke-width="1.0"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12.0" fill="#f59e0b" stroke="none" stroke-width="1.0" opacity="0.16"/><rect x="569.5" y="742.0" width="61.0" height="24.0" rx="12.0" fill="none" stroke="#f59e0b" stroke-width="1" opacity="0.7"/><text x="600.0" y="758.7" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="13" font-weight="600" fill="#f59e0b" text-anchor="middle">stays</text><rect x="48.0" y="804.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1.0"/><text x="70.0" y="836.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">NVIDIA GB10 GPU</text><text x="70.0" y="860.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">DGX Spark, sm_121</text><rect x="664.0" y="804.0" width="488.0" height="72.0" rx="16.0" fill="#0e1219" stroke="#2a3648" stroke-width="1"/><text x="686.0" y="836.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="19" font-weight="650" fill="#f1f5f9" text-anchor="start">NVIDIA GB10 GPU</text><text x="686.0" y="860.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">DGX Spark, sm_121</text><rect x="48.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#64748b" stroke-width="1.5"/><text x="70.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">closed, replaced by CUDA++</text><rect x="300.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0b1a17" stroke="#00e599" stroke-width="1.5"/><text x="322.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">first-party, Apache-2.0+LLVM</text><rect x="560.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#2d7ff9" stroke-width="1.5"/><text x="582.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA open source, stays</text><rect x="840.0" y="895.0" width="14.0" height="14.0" rx="3" fill="#0e1219" stroke="#f59e0b" stroke-width="1.5"/><text x="862.0" y="907.0" font-family="Inter, ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="14" font-weight="400" fill="#94a3b8" text-anchor="start">NVIDIA signed firmware, stays</text></svg>
diff --git a/evidence/docs-current-contract-20261027/README.md b/evidence/docs-current-contract-20261027/README.md
new file mode 100644
index 00000000..1436072d
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/README.md
@@ -0,0 +1,65 @@
+# Current-contract docs and stack legend repair
+
+Host-only receipt, 2026-10-27. No GPU device was opened.
+
+- Base: `bba6da8045ba5baaf0a81f7152af44d52e24f563`.
+- Tested source: `8b022055ad01bc148ff4f8fa6c7443995e5b5510`.
+- Machine: Linux x86_64, kernel `6.18.55`.
+- Tools: Python `3.12.14`, Inkscape `1.4 (e7c3feb100, 2024-10-09)`, GCC `14.2.0`.
+
+## Scope
+
+Move only the open-source and firmware legend items so the longer first-party
+licence label does not overlap them. Keep all legend text and the figure size.
+Add a focused Inkscape geometry check and a deliberately overlapping negative
+control. The normal build and runtime do not acquire an Inkscape dependency.
+
+Correct the current decode-tool requirements and residual present-tense claims
+about the removed trace listing. Preserve #84/#93 history and #98's existing
+corrections. Qualify the L401 kernel-module scope as pending a separate kernel
+decision. No runtime, swap, driver, test-runner, licence or architecture changes.
+
+## Results
+
+| Command or check | Result | Evidence |
+|---|---|---|
+| `python3 tools/figures/test_stack_legend.py -v`, before the fix | exit 1, rendered items 3 and 4 overlap; negative control passes | `legend-red.log` |
+| Same command on tested source | exit 0, both tests pass | `focused.log` |
+| `python3 tools/figures/make_figures.py --check` | exit 0, `figures current: 10` | `focused.log` |
+| Inkscape before/after crops and queried bounds | overlap before; clear labels after | `legend-geometry.txt` and independent review |
+| Python AST, shell syntax, Markdown parse, whitespace | pass | `docs-checks.log` |
+| Current runner/tool references | source-checked, not executed | `docs-checks.log` |
+| `make test` | exit 2, build failure before suite completion | `make-test.log` |
+| `make -j2` | exit 2, build failure | `make-build.log` |
+
+The red check ran on `061493a39608b6e4eed261cb52c6d024b374f1b4` with the new test.
+The generator is byte-identical on the later base `bba6da8` (SHA-256
+`7375e608e7edcf494916e00b676072c3cf4e9b49f35f762f0b34ad46a4897564`). The independent
+review also replayed that base generator and reproduced the same failure.
+`legend-red.log` replaces the private checkout prefix with a repository-relative
+path; no result text is changed. Source-commit runs reuse earlier build outputs.
+
+### Build and full-suite failures
+
+The x86_64 assembler rejects unchanged AArch64 barriers:
+
+- `src/omega_blackwell_engine.c:393` and `:558`, `ds` operand mismatch.
+- The parallel build also reaches `src/omega_blackwell_submit.c:279`, `:372`,
+  `:532` and `:613`, with the same operand mismatch.
+
+Neither build nor the complete host suite passed. No barrier, gate or compiler
+setting was changed. A native qualified-host build and host-suite run remain
+required. The trace-emitter runner and all GPU/chip checks are NOT_RUN here.
+
+## Review and publication limits
+
+An independent read-only reviewer reproduced the baseline failure, reran both
+focused tests and the figure check, inspected the before/after pixels and verified
+that only legend x coordinates changed in the generated SVG. It checked the
+prose against the runner and current tree. Final verdict: no remaining review
+findings. See `REVIEW.md` for the exact reviewed content hashes.
+
+The repository's audit scanner self-test passed with all planted controls found.
+A scan of the source patch and new test reported no secret or private-pattern
+hits. Commands and output are in `audit.log`. This is a patch-level check, not a
+new audit of all repository history.
diff --git a/evidence/docs-current-contract-20261027/REVIEW.md b/evidence/docs-current-contract-20261027/REVIEW.md
new file mode 100644
index 00000000..54e22bde
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/REVIEW.md
@@ -0,0 +1,28 @@
+# Independent local review
+
+A separate read-only reviewer inspected the final source patch against base
+`bba6da8045ba5baaf0a81f7152af44d52e24f563`. It did not author or edit the repair.
+This is a local review, not a GitHub approval or permission to publish.
+
+Final verdict: no remaining review findings.
+
+Verified:
+- Original generator reproduces `legend items 3 and 4 overlap`.
+- Both repaired legend tests pass, including the overlapping-swatch control.
+- Figure check reports `figures current: 10`.
+- Before/after pixels show readable, separated labels.
+- SVG delta contains only four legend x-coordinate updates.
+- Python syntax and whitespace checks pass.
+- Optional C/artifact checks and mandatory runner invocation match PROVENANCE.
+- Historical listing attribution and supported kernel-module path are preserved.
+- No runtime changes or duplicate #98 corrections.
+- AGENTS documents the test and Inkscape dependency; no cache files are included.
+
+Reviewed tracked diff SHA-256 (base to repair, excluding the new test):
+`4b1f299629a5d92429d603301f72d54cf6f822222c338ce64e0d08f518bf1d56`
+
+New test SHA-256:
+`00c2df8483d222e424204526275739caa237d2a7257aed4e29a7eefc3aeea2cb`
+
+After the local source commit, those hashes were verified unchanged at
+`8b022055ad01bc148ff4f8fa6c7443995e5b5510`. The full-suite failure is not waived.
diff --git a/evidence/docs-current-contract-20261027/audit.log b/evidence/docs-current-contract-20261027/audit.log
new file mode 100644
index 00000000..d5c84789
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/audit.log
@@ -0,0 +1,18 @@
+Patch-only audit, run from the repository root on source commit
+8b022055ad01bc148ff4f8fa6c7443995e5b5510. Not a repository-history audit.
+Temporary directory names below are represented by shell variables.
+
+$ tools/extract/audit-selftest.sh
+SELFTEST PASS: planted 15 (one in a deleted file's history, one in a commit message), found 15
+exit=0
+
+$ checkdir=$(mktemp -d)
+$ git init -q "$checkdir"
+$ git diff bba6da8045ba5baaf0a81f7152af44d52e24f563..8b022055ad01bc148ff4f8fa6c7443995e5b5510 > "$checkdir/repair.patch"
+$ cp tools/figures/test_stack_legend.py "$checkdir/test_stack_legend.py"
+$ git -C "$checkdir" -c user.name=Test -c user.email=test@example.invalid add .
+$ git -C "$checkdir" -c user.name=Test -c user.email=test@example.invalid commit -qm 'local repair scan fixture'
+$ out=$(mktemp -d)  # any writable output directory
+$ tools/extract/audit-scan.sh "$checkdir" "$out"
+blobs 2  binaries 0  secret-hits 0  private-hits 0 (0 distinct)
+exit=0
diff --git a/evidence/docs-current-contract-20261027/docs-checks.log b/evidence/docs-current-contract-20261027/docs-checks.log
new file mode 100644
index 00000000..80a11007
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/docs-checks.log
@@ -0,0 +1,22 @@
+$ git diff --check
+PASS
+$ python3 AST parse for both figure scripts
+PASS tools/figures/make_figures.py
+PASS tools/figures/test_stack_legend.py
+$ sh -n tests/device-trace/run-emitter-checks.sh tools/artifact_smoke.sh
+PASS
+$ pandoc -f gfm -t html README.md PROVENANCE.md CONTRIBUTING.md AGENTS.md docs/HOW_I_DID_IT.md
+PASS
+$ test ! -e tests/device-trace/expected.sass
+PASS: removed fixture is absent
+$ grep -n nvdisasm tests/device-trace/run-emitter-checks.sh
+6:#   2. nvdisasm 13.0 on the emitted words   -- an outside oracle. It is not part of the
+64:nvdisasm --binary SM121 "$work/words.bin" > "$work/got.sass"
+94:echo 'nvdisasm decode matches the hand-written expectations (40 instructions)'
+$ grep -n "access(nv" tests/gpu_reconv_test.c
+177:    if (access(nv, X_OK) != 0) { printf("nvdisasm: not present, listing check skipped for %s\n", name); return 0; }
+$ grep -n "command -v" tools/artifact_smoke.sh
+11:    if command -v nvdisasm >/dev/null 2>&1; then
+16:    if command -v cuobjdump >/dev/null 2>&1; then
+$ git diff --name-only -- src native swap nvrm tests/device-trace
+PASS: no runtime, swap or emitter changes
diff --git a/evidence/docs-current-contract-20261027/focused.log b/evidence/docs-current-contract-20261027/focused.log
new file mode 100644
index 00000000..a7bc27e3
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/focused.log
@@ -0,0 +1,12 @@
+$ PYTHONDONTWRITEBYTECODE=1 python3 tools/figures/test_stack_legend.py -v
+test_overlapping_swatch_is_rejected (__main__.StackLegendTest.test_overlapping_swatch_is_rejected) ... ok
+test_rendered_labels_and_swatches_do_not_overlap (__main__.StackLegendTest.test_rendered_labels_and_swatches_do_not_overlap) ... ok
+
+----------------------------------------------------------------------
+Ran 2 tests in 1.383s
+
+OK
+exit=0
+$ python3 tools/figures/make_figures.py --check
+figures current: 10
+exit=0
diff --git a/evidence/docs-current-contract-20261027/legend-geometry.txt b/evidence/docs-current-contract-20261027/legend-geometry.txt
new file mode 100644
index 00000000..ae3d4568
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/legend-geometry.txt
@@ -0,0 +1,41 @@
+MEASURED with Inkscape 1.4 --query-all. Units: SVG px.
+Column order: x, y, width, height.
+Font fallback on this host: fc-match Inter -> OpenAI Sans Regular.
+
+Before, generator 7375e608e7edcf494916e00b676072c3cf4e9b49f35f762f0b34ad46a4897564:
+closed label:       70.434,896.626,178.388,13.426
+first-party label: 322.168,896.752,179.396,13.3
+open swatch:       439.25,894.25,15.5,15.5
+open label:        463.064,896.794,164.976,13.258
+firmware swatch:   739.25,894.25,15.5,15.5
+firmware label:    763.064,896.752,186.228,13.3
+
+After, source 8b022055ad01bc148ff4f8fa6c7443995e5b5510:
+closed label:       70.434,896.626,178.388,13.426
+first-party label: 322.168,896.752,179.396,13.3
+open swatch:       559.25,894.25,15.5,15.5
+open label:        583.064,896.794,164.976,13.258
+firmware swatch:   839.25,894.25,15.5,15.5
+firmware label:    863.064,896.752,186.228,13.3
+
+MODELED arithmetic, WolframLanguageEvaluator, derived from those measured bounds:
+Before query:
+N[{299250,439250,739250}/1000 - ({70434,322168,463064}+{178388,179396,164976})/1000]
+Result (SVG px): {50.428, -62.314, 111.21}
+
+After query:
+x = {70434,322168,583064,863064}/1000;
+w = {178388,179396,164976,186228}/1000;
+nextSwatch = {299250,559250,839250}/1000;
+{N[nextSwatch - Take[x+w,3]], N[Last[x+w]],
+ And@@Thread[nextSwatch>Take[x+w,3]], Last[x+w]<1152}
+Result: {{50.428,57.686,91.21},1049.292,True,True}
+The gaps and final right edge are in SVG px. The final edge is inside the existing
+content edge at 1152 SVG px. This is layout evidence, not GPU evidence.
+
+Before/after render command (run on each version):
+inkscape docs/img/stack.svg --export-area=0:870:1200:930 --export-filename=stack.png
+Both crops were inspected by the author and independent reviewer.
+The actual renderer emits environment font/profile warnings on this host, but
+returns zero and produces the images and bounds. The regression uses an isolated
+writable profile and cache. No font or package was installed.
diff --git a/evidence/docs-current-contract-20261027/legend-red.log b/evidence/docs-current-contract-20261027/legend-red.log
new file mode 100644
index 00000000..c3ef4d00
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/legend-red.log
@@ -0,0 +1,17 @@
+test_overlapping_swatch_is_rejected (__main__.StackLegendTest.test_overlapping_swatch_is_rejected) ... ok
+test_rendered_labels_and_swatches_do_not_overlap (__main__.StackLegendTest.test_rendered_labels_and_swatches_do_not_overlap) ... FAIL
+
+======================================================================
+FAIL: test_rendered_labels_and_swatches_do_not_overlap (__main__.StackLegendTest.test_rendered_labels_and_swatches_do_not_overlap)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "tools/figures/test_stack_legend.py", line 54, in test_rendered_labels_and_swatches_do_not_overlap
+    assert_clear(self, fig_stack().svg())
+  File "tools/figures/test_stack_legend.py", line 49, in assert_clear
+    test.assertFalse(overlap, f"legend items {j} and {i} overlap")
+AssertionError: True is not false : legend items 3 and 4 overlap
+
+----------------------------------------------------------------------
+Ran 2 tests in 1.571s
+
+FAILED (failures=1)
diff --git a/evidence/docs-current-contract-20261027/make-build.log b/evidence/docs-current-contract-20261027/make-build.log
new file mode 100644
index 00000000..08375851
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/make-build.log
@@ -0,0 +1,16 @@
+$ make -j2
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_engine.c -o build/omega_blackwell_engine.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_realize.c -o build/omega_blackwell_realize.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_submit.c -o build/omega_blackwell_submit.o
+src/omega_blackwell_engine.c: Assembler messages:
+src/omega_blackwell_engine.c:558: Error: number of operands mismatch for `ds'
+src/omega_blackwell_engine.c:393: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/omega_blackwell_engine.o] Error 1
+make: *** Waiting for unfinished jobs....
+src/omega_blackwell_submit.c: Assembler messages:
+src/omega_blackwell_submit.c:279: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:372: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:532: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:613: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/omega_blackwell_submit.o] Error 1
+exit=2
diff --git a/evidence/docs-current-contract-20261027/make-test.log b/evidence/docs-current-contract-20261027/make-test.log
new file mode 100644
index 00000000..85296f30
--- /dev/null
+++ b/evidence/docs-current-contract-20261027/make-test.log
@@ -0,0 +1,7 @@
+$ make test
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_engine.c -o build/omega_blackwell_engine.o
+src/omega_blackwell_engine.c: Assembler messages:
+src/omega_blackwell_engine.c:558: Error: number of operands mismatch for `ds'
+src/omega_blackwell_engine.c:393: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/omega_blackwell_engine.o] Error 1
+exit=2
diff --git a/evidence/docs-current-contract-published-20261027/README.md b/evidence/docs-current-contract-published-20261027/README.md
new file mode 100644
index 00000000..0b4c3a71
--- /dev/null
+++ b/evidence/docs-current-contract-published-20261027/README.md
@@ -0,0 +1,26 @@
+# Publication identity mapping
+
+This is the authoritative mapping for the local commit IDs in the earlier docs
+repair receipts. Command-line HTTPS Git publication had no credential helper;
+the authorized GitHub native Git-object API published the reviewed snapshot
+instead. Its commit metadata differs, but its complete tree is identical.
+
+- Local final verified snapshot: `263a11de500efc8c7974ec3d1e78b875aa17687b`.
+- Published snapshot: `62cefb65105addcf587bbad15f26eb856b38f1b9`.
+- Both complete trees: `51f81152d91aba35093d21fa8ac8461241f88a54`.
+- Base: `67f3135ef88d8f520dfc15a2b2bc3264f53f0d6a`.
+
+Every uploaded blob SHA and the resulting complete tree SHA were checked against
+the local snapshot. The commit adding this mapping changes only this file.
+The source repair, tests and all recorded receipts are unchanged.
+
+Earlier IDs `8b02205`, `d56c5c7`, `b2c78f9`, `865c4d2` and `263a11d` identify local
+pre-publication snapshots, not independently published branches. The rebased
+receipt's instruction to use its new IDs for published source is superseded by
+this mapping. Use `62cefb65105addcf587bbad15f26eb856b38f1b9` for the byte-identical
+published source and the PR's final head for exact CI status.
+
+Local focused tests and figure consistency passed; the x86_64 full build/suite
+failures remain disclosed in `../docs-current-contract-rebased-20261027/`.
+No native ARM64 or GPU execution is claimed by this mapping. CI is separate
+head-specific evidence. Publication does not authorize merge or deployment.
diff --git a/evidence/docs-current-contract-rebased-20261027/README.md b/evidence/docs-current-contract-rebased-20261027/README.md
new file mode 100644
index 00000000..adcfffbc
--- /dev/null
+++ b/evidence/docs-current-contract-rebased-20261027/README.md
@@ -0,0 +1,39 @@
+# Rebased docs repair verification
+
+Host-only, Linux x86_64. Rebased base:
+`67f3135ef88d8f520dfc15a2b2bc3264f53f0d6a`.
+Tested head: `865c4d22c01d4af9ce6e2108268557e23db7ff22`.
+Source repair commit: `b2c78f9f9ea3c5c39ea2b37f5287172dd02a80f0`.
+
+The prior local-only source and receipt commits were rebased without conflict:
+
+```
+1:  8b02205 = 1:  b2c78f9 docs: align current provenance and repair stack legend spacing
+2:  d56c5c7 = 2:  865c4d2 test(docs): record legend regression and host verification limits
+```
+
+An independent reviewer confirmed this range-diff and the unchanged repair.
+The earlier receipt remains an immutable record of the local pre-publication
+snapshot. Its old commit IDs identify that local snapshot; use the new IDs above
+for published source. Upstream README first-kernel instructions are retained.
+No currently open PR edited the affected docs or figure files at the owner check.
+
+Fresh verification:
+
+- `python3 tools/figures/test_stack_legend.py -v`: both tests pass, including the
+  deliberate-overlap negative control. See `focused.log`.
+- `python3 tools/figures/make_figures.py --check`: `figures current: 10`.
+- `git diff origin/main...HEAD --check`: exit 0.
+- Inkscape re-render of the bottom legend was visually inspected. The labels
+  remain separated; no figure content or dimensions changed during the rebase.
+- `make OUT_DIR=build/docs-rebase test`: exit 2 before suite completion, unchanged
+  x86_64 assembler refusal of AArch64 barriers in `omega_blackwell_engine.c:393`
+  and `:558`. This used a fresh output directory. See `make-test.log`.
+- `make OUT_DIR=build/docs-rebase -j2`: exit 2. The parallel build also reaches
+  `omega_blackwell_submit.c:284`, `:377`, `:541` and `:622`, with the same `ds`
+  operand errors. See `make-build.log`.
+
+The local build and full host suite have not passed. No barrier, compiler flag,
+gate, runtime, swap path or driver code was changed by this repair. GPU/chip
+execution and the trace-emitter runner remain NOT_RUN here. CI results, including
+native ARM64 checks, are separate evidence for the published PR head.
diff --git a/evidence/docs-current-contract-rebased-20261027/focused.log b/evidence/docs-current-contract-rebased-20261027/focused.log
new file mode 100644
index 00000000..2af55882
--- /dev/null
+++ b/evidence/docs-current-contract-rebased-20261027/focused.log
@@ -0,0 +1,15 @@
+tested head: 865c4d22c01d4af9ce6e2108268557e23db7ff22
+$ python3 tools/figures/test_stack_legend.py -v
+test_overlapping_swatch_is_rejected (__main__.StackLegendTest.test_overlapping_swatch_is_rejected) ... ok
+test_rendered_labels_and_swatches_do_not_overlap (__main__.StackLegendTest.test_rendered_labels_and_swatches_do_not_overlap) ... ok
+
+----------------------------------------------------------------------
+Ran 2 tests in 2.081s
+
+OK
+exit=0
+$ python3 tools/figures/make_figures.py --check
+figures current: 10
+exit=0
+$ git diff origin/main...HEAD --check
+exit=0
diff --git a/evidence/docs-current-contract-rebased-20261027/make-build.log b/evidence/docs-current-contract-rebased-20261027/make-build.log
new file mode 100644
index 00000000..c3fdb584
--- /dev/null
+++ b/evidence/docs-current-contract-rebased-20261027/make-build.log
@@ -0,0 +1,18 @@
+$ make OUT_DIR=build/docs-rebase -j2
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_engine.c -o build/docs-rebase/omega_blackwell_engine.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_matmul.c -o build/docs-rebase/omega_blackwell_matmul.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_qmd.c -o build/docs-rebase/omega_blackwell_qmd.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_realize.c -o build/docs-rebase/omega_blackwell_realize.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_submit.c -o build/docs-rebase/omega_blackwell_submit.o
+src/omega_blackwell_engine.c: Assembler messages:
+src/omega_blackwell_engine.c:558: Error: number of operands mismatch for `ds'
+src/omega_blackwell_engine.c:393: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/docs-rebase/omega_blackwell_engine.o] Error 1
+make: *** Waiting for unfinished jobs....
+src/omega_blackwell_submit.c: Assembler messages:
+src/omega_blackwell_submit.c:284: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:377: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:541: Error: number of operands mismatch for `ds'
+src/omega_blackwell_submit.c:622: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/docs-rebase/omega_blackwell_submit.o] Error 1
+exit=2
diff --git a/evidence/docs-current-contract-rebased-20261027/make-test.log b/evidence/docs-current-contract-rebased-20261027/make-test.log
new file mode 100644
index 00000000..a84cf153
--- /dev/null
+++ b/evidence/docs-current-contract-rebased-20261027/make-test.log
@@ -0,0 +1,25 @@
+$ make OUT_DIR=build/docs-rebase test
+mkdir -p build/docs-rebase
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen.c -o build/docs-rebase/omega_blackwell_codegen.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_attn.c -o build/docs-rebase/omega_blackwell_codegen_attn.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_bf16.c -o build/docs-rebase/omega_blackwell_codegen_bf16.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_dec.c -o build/docs-rebase/omega_blackwell_codegen_dec.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_gemm.c -o build/docs-rebase/omega_blackwell_codegen_gemm.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_moe.c -o build/docs-rebase/omega_blackwell_codegen_moe.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_moe2.c -o build/docs-rebase/omega_blackwell_codegen_moe2.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pattn.c -o build/docs-rebase/omega_blackwell_codegen_pattn.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pf.c -o build/docs-rebase/omega_blackwell_codegen_pf.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pfhost.c -o build/docs-rebase/omega_blackwell_codegen_pfhost.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_qg.c -o build/docs-rebase/omega_blackwell_codegen_qg.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_qmma.c -o build/docs-rebase/omega_blackwell_codegen_qmma.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_router.c -o build/docs-rebase/omega_blackwell_codegen_router.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tc.c -o build/docs-rebase/omega_blackwell_codegen_tc.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tc2.c -o build/docs-rebase/omega_blackwell_codegen_tc2.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tern.c -o build/docs-rebase/omega_blackwell_codegen_tern.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_encoder.c -o build/docs-rebase/omega_blackwell_encoder.o
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_engine.c -o build/docs-rebase/omega_blackwell_engine.o
+src/omega_blackwell_engine.c: Assembler messages:
+src/omega_blackwell_engine.c:558: Error: number of operands mismatch for `ds'
+src/omega_blackwell_engine.c:393: Error: number of operands mismatch for `ds'
+make: *** [Makefile:40: build/docs-rebase/omega_blackwell_engine.o] Error 1
+exit=2
diff --git a/tools/figures/make_figures.py b/tools/figures/make_figures.py
index a700c4ce..5efef0b0 100644
--- a/tools/figures/make_figures.py
+++ b/tools/figures/make_figures.py
@@ -280,7 +280,7 @@ def fig_stack():
         y += rh + gap
     ly = y + 16
     for lab, col, x in (("closed, replaced by CUDA++", INK3, 48), ("first-party, Apache-2.0+LLVM", GREEN, 300),
-                        ("NVIDIA open source, stays", BLUE, 440), ("NVIDIA signed firmware, stays", AMBER, 740)):
+                        ("NVIDIA open source, stays", BLUE, 560), ("NVIDIA signed firmware, stays", AMBER, 840)):
         s.rect(x, ly - 11, 14, 14, stroke=col, fill="#0b1a17" if col == GREEN else CARD, rx=3, sw=1.5)
         s.text(x + 22, ly + 1, lab, size=14, fill=INK2)
     return s
diff --git a/tools/figures/test_stack_legend.py b/tools/figures/test_stack_legend.py
new file mode 100644
index 00000000..28485a5a
--- /dev/null
+++ b/tools/figures/test_stack_legend.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+"""Check rendered legend geometry. Run with Python 3 and Inkscape installed."""
+import os
+from pathlib import Path
+import shutil
+import subprocess
+import tempfile
+import unittest
+import xml.etree.ElementTree as ET
+
+from make_figures import fig_stack
+
+
+def legend_bounds(svg):
+    """Measure the final swatch/label pairs with the SVG's real font fallback."""
+    root = ET.fromstring(svg)
+    legend = list(root)[-8:]
+    assert [e.tag.rsplit("}", 1)[-1] for e in legend] == ["rect", "text"] * 4
+    for i, element in enumerate(legend):
+        element.set("id", f"legend-{i}")
+    inkscape = shutil.which("inkscape")
+    if not inkscape:
+        raise RuntimeError("Inkscape is required for the rendered legend check")
+    with tempfile.TemporaryDirectory(prefix="cudapp-legend-") as work:
+        path = Path(work) / "stack.svg"
+        ET.ElementTree(root).write(path)
+        env = dict(os.environ, HOME=work, XDG_CACHE_HOME=work)
+        result = subprocess.run([inkscape, str(path), "--query-all"], env=env,
+                                check=True, capture_output=True, text=True)
+    bounds = {}
+    for line in result.stdout.splitlines():
+        fields = line.split(",")
+        if fields[0].startswith("legend-"):
+            bounds[fields[0]] = tuple(map(float, fields[1:]))
+    return root, [bounds[f"legend-{i}"] for i in range(len(legend))]
+
+
+def assert_clear(test, svg):
+    root, boxes = legend_bounds(svg)
+    width, height = float(root.get("width")), float(root.get("height"))
+    for i, (x, y, w, h) in enumerate(boxes):
+        test.assertGreaterEqual(x, 0, f"legend item {i} outside left edge")
+        test.assertGreaterEqual(y, 0, f"legend item {i} outside top edge")
+        test.assertLessEqual(x + w, width, f"legend item {i} clipped at right edge")
+        test.assertLessEqual(y + h, height, f"legend item {i} clipped at bottom edge")
+        for j, (xx, yy, ww, hh) in enumerate(boxes[:i]):
+            overlap = x < xx + ww and xx < x + w and y < yy + hh and yy < y + h
+            test.assertFalse(overlap, f"legend items {j} and {i} overlap")
+
+
+class StackLegendTest(unittest.TestCase):
+    def test_rendered_labels_and_swatches_do_not_overlap(self):
+        assert_clear(self, fig_stack().svg())
+
+    def test_overlapping_swatch_is_rejected(self):
+        root = ET.fromstring(fig_stack().svg())
+        legend = list(root)[-8:]
+        legend[4].set("x", legend[3].get("x"))
+        with self.assertRaisesRegex(AssertionError, "overlap"):
+            assert_clear(self, ET.tostring(root, encoding="unicode"))
+
+
+if __name__ == "__main__":
+    unittest.main()