Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/docs/OMEGA_HOST_TESTS.md # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / docs / OMEGA_HOST_TESTS.md` 572 lines · 32830 bytes Raw Blame History Rendered 1 # Portable host checks and target-only commands 2 3 `make test` is the host suite. It does not need a CUDA toolkit, NVIDIA 4 userspace tools or a GPU device node. Carried seeded-Omega mutation gates, 5 including `test-codegen-f64`, require the pinned compiler and bridge checkouts; 6 set their environment as described in [the f64 host runbook](CODEGEN_F64.md). 7 Builds and simulations run in the required device-free `bwrap` namespace; 8 they must not open `/dev/nvidia*` or `/dev/aien-gpu`. 9 10 ## Integration long-run receipts (2026-11-06) 11 12 These are host differentials, not chip qualification. All three ran inside 13 `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10`. 14 15 | Path | Source | Observed result | Local receipt | 16 | --- | --- | --- | --- | 17 | QMMA | ``62640e93b39ca6a6a33a1795d5463db1297eb81f`` | rc 0; structure exhaustive NITER bit-basis PASS (94 values, zero refused); NITER-dependence and output mutants caught; `CODEGEN QMMA DIFF PASS (714275 cases)` | `/tmp/integ/codegen-a-qmma-bwrap.log` | 18 | TGEMM exhaustive | ``62640e93b39ca6a6a33a1795d5463db1297eb81f`` | rc 0; mutant caught; `CODEGEN TGEMM EXHAUSTIVE DIFF PASS (`17276981` accepted cases)` | `/tmp/integ/codegen-a-tgemm-exhaustive-bwrap.log` | 19 | MoE | #284 ``262275e`` | record negative control caught; `CODEGEN MOE DIFF PASS (`1732053` programs, 10681 refusals)` | `/tmp/integ/moe-final-diff-`262275e`-b.log` | 20 21 QMMA and TGEMM commands were `OUT_DIR=build/integ-long-62640` followed by the 22 wrapper above and respectively `make -j3 test-codegen-qmma-diff` and 23 `make -j3 test-codegen-tgemm-exhaustive`. MoE is Main's recorded differential 24 receipt. These results do not substitute for the integrated full host suite. 25 26 On x86-64, when you did not set `CC`, `make` uses gcc. GNU make's built-in 27 `CC=cc` is left alone on AArch64, so a GB10 `make` still invokes `cc`. 28 `make CC=clang test` still uses the compiler you named. Engine simulator 29 recipes that name `gcc` directly keep that compiler. 30 31 The default `CUDAPP_MEM_RESERVE_MIB` is 4096. It is not changed. On the x86-64 32 VM in `evidence/HOST-X86-`20261030``, `make CC=gcc -j4 test` exits 2 at that 33 default and passes only with `CUDAPP_MEM_RESERVE_MIB=0`. The failing check 34 refuses a 741.9 MiB serving upload because 4.6 GiB is free and the runtime 35 keeps 4.0 GiB free. A host that cannot keep 4096 MiB free fails the same way. 36 GitHub Actions runs `CUDAPP_MEM_RESERVE_MIB=0 make CC=gcc -j4 test` and 37 `make CC=gcc gpu-engine-freestanding` on `ubuntu-24.04` 38 (`.github/workflows/host-x86.yml`). The AArch64 `host-tests` job is unchanged. 39 GB10 stays NOT_RUN. 40 41 On x86-64, `make test` does not count checks that execute the seeded AArch64 42 binding or the pinned `omc`. Those targets still exist. Invoking one directly 43 exits 2 and names the requirement. `make test-omega-target-only` prints one 44 line per name in `CUDAPP_TARGET_ONLY_TESTS` and exits 0; that exit is the 45 report, not a pass of the named checks. On AArch64 those checks stay inside 46 `make test`. The list includes `test-qmma-probe-rest-mutants`, 47 `test-core-residue-mutants`, `test-c5-policy`, `test-dagsim-jstr-om`, 48 `test-disasm-words`, `test-graph-table-perm`, `test-graph-headscale`, 49 `test-numeric-om-mutants`, `test-numeric-rest-om-mutants`, `test-nvrm-alloc`, 50 `test-platform-linux-fake-device`, `test-prefill-host-rest`, `test-codegen-fixture-rest`, 51 `test-gpu-attn-any-mutants`, `test-codegen-pfhost-admit-mutants`, `test-codegen-tc-mutants`, 52 `test-codegen-tc-host-mutants`, `test-gpu-conv2d-mutants`, `test-core-mutants`, 53 `test-gpu-dnn-activations-mutants`, `test-dnn-half-mutants`, `test-gpu-dnn-rows-mutants` and 54 `test-engine-fixture-rest`. 55 56 `test-gpu-imadhi-rc` and `test-dagsim` stay in `make test` on x86-64. They are 57 host programs and do not open a device. On the VM in 58 `evidence/HOST-X86-`20261030``, after main ``b4f0480`` was merged, 59 `CUDAPP_MEM_RESERVE_MIB=0 make CC=gcc -j4 test` exited 0 and ended 60 `CUDA++ HOST TESTS PASS (57 targets)`. Inside that run `test-gpu-imadhi-rc` 61 printed PASS for `bw_warp_sim.h`, `bw_warp_sim_tc.h`, `bw_warp_sim_k.h` and 62 `bw_warp_sim_pa.h`. `test-dagsim` printed `dagsim_unit: 171 checks, 0 failed`. 63 The same `make CC=gcc test-gpu-imadhi-rc` command by itself also exited 0. 64 GB10 stays NOT RUN. 65 66 Three targets in that suite are the fresh-checkout contract: 67 68 ```sh 69 make test-omega-slice-runner # missing compiler, missing slice, wrong pin 70 make test-omega-arch-guard # x86-64 production refusal 71 make test-omega-barrier-contract # dsb sy stays on AArch64; x86-64 keeps a real fence 72 make test-omega-binding-portable # revision and epoch vectors 73 make test-omega-target-only # names the checks this host does not run 74 ``` 75 76 ## Binary64 codegen 77 78 `test-codegen-f64` is registered in `CARRIED_HOST_TESTS` by 79 `mk/codegen-f64.mk`. It runs independent C/seeded byte differentials, 80 IEEE binary64 edge vectors, register-pair pressure/refusal, the append-only 81 replay bound, a simulated DFMA/DSETP probe and six compiled seeded mutants. 82 The `codegen_f64_probe --chip` mode is never a host-suite dependency and is 83 NOT_RUN without a current exclusive window. See [the encoding facts and 84 chip runbook](CODEGEN_F64.md). 85 86 ## Ternary row-major simulation 87 88 The ternary `test-gpu-tern-sched` target also runs an independent row-major 89 warp-simulator regression. Its packed weights and expected row values do not 90 use the API packer or Omega's algebra oracle. 91 92 When reusing the pinned Omega `tests/gpu_tern_test.c` battery, pre-include 93 CUDA++'s `tests/bw_warp_sim_k.h` in the test translation unit. Quoted includes 94 otherwise select the simulator beside the external test, which at Omega 95 ``e5b32567`` ignores scalar `LDG.E` immediate offsets. That stale simulator fails 96 row-major cases even with the unchanged C builder. Do not alter the generator, 97 packing, or expected values to accommodate it. The integration 98 `test-codegen-tern-sim` target already uses a current-simulator adapter. 99 100 ## Memory ordering 101 102 `nvrm/cpu_barrier.h` is the publication barrier. 103 104 - On AArch64 the instruction is `dsb sy`. That is the GB10 host barrier. The 105 production backend is not rebuilt with a no-op, an empty `asm`, or a dropped 106 fence. 107 - On x86-64 the instruction is a sequentially consistent fence. The object 108 contains that fence. It is how the portable host suite compiles the same 109 sources. 110 - `OMEGA_BLACKWELL_HOST_SIMULATOR` is a compile definition for the fake-driver 111 engine tests (`test-gpu-engine-sim` and `test-gpu-engine-backend-mutants`). 112 It lets those tests call the backend on a non-AArch64 host. It does not 113 enable a real device. The production library is built without it. On x86-64 114 that library's Blackwell open and the direct matmul and vector entries return 115 `ENOTSUP` and the text `requires AArch64 Linux`, and they do not call the 116 driver. 117 118 `make test-omega-arch-guard` runs that refusal on x86-64. On AArch64 the same 119 target prints `NOT_RUN` and does not build the binary, because a cross 120 compile is not an x86-64 runtime result and the production path must not be 121 asked to open a device from this check. `CROSS_COMPILE_ONLY=1` records the 122 same `NOT_RUN` after a cross compile. 123 124 `make test-omega-barrier-contract` rejects a raw `dsb sy` outside 125 `#if defined(__aarch64__)`, checks the header split, and disassembles a tiny 126 caller. A one-line unguarded fixture must fail. If `aarch64-linux-gnu-gcc` is 127 absent on an x86-64 host, the AArch64 object row prints `NOT_RUN`. The source 128 contract still runs. 129 130 ## Seeded binding on a non-AArch64 host 131 132 `om/units.sh` emits every seeded unit as checked portable C through the pinned 133 omega-bridge (`om/omega-bridge.lock`): `src/cudapp_om_.c` for the hosted 134 units and `src/cudapp_freest_.c` for the import-free scalar units. They 135 are generated and not edited. Every host compiles the same files, so x86-64 136 runs `bw_enc_sm121.om`, `cubin_elf.om` and the native units through the same C 137 that AArch64 links. `make test-om-encoder`, `make test-om-cubin`, 138 `make test-codegen-freestanding` and `make test-gpu-native-runtime` run on 139 x86-64. 140 141 `make test-omega-binding-portable` checks the revision and epoch vectors 142 against the generated `src/cudapp_freest_revision.c` and 143 `src/cudapp_freest_epoch.c` on every host. 144 145 The pinned compiler omc is an AArch64 binary. These commands execute it, so on 146 x86-64 they exit 2 unless `OMEGA_OMC` is given explicitly and executes there 147 (`.github/workflows/ampere-x86.yml` registers the pinned QEMU provenance oracle 148 for that job). They run for real on AArch64 when their other tools are 149 present: 150 151 ```sh 152 make test-om-spec-encoder 153 make test-portable-receipts 154 make test-model-capacity 155 make test-prof 156 ``` 157 158 `make test-codegen-freestanding` on x86-64 still runs the freestanding C 159 encoder checks. The hosted `.om` comparison prints `NOT_RUN` and is not 160 performed. `CUDAPP_ENCODER=diff` on x86-64 is an error: that mode executes the 161 seeded binding. 162 163 `make test-gpu-session-mutants` on x86-64 still runs the nine session-shell 164 mutants. Its seven Omega-unit mutants regenerate `.om` through `om/units.sh`, 165 so they print `NOT_RUN` there unless `OMEGA_OMC` is given and executes on that 166 host. The final line counts only the mutants that ran. The same split applies 167 to `test-chip-enum-om` (differential, controls and fixture scan run; seven 168 `.om` mutants print `NOT_RUN`), `test-codegen-base-om` (the C comparison runs; 169 `om/units.sh --check` prints `NOT_RUN`), `test-regalloc-om` (same split) and 170 `test-codegen-rest` (differential and coverage run; the Omega mutants print 171 `NOT_RUN`). `CUDAPP_OMC_STEP` (Makefile) gives the same split to one recipe 172 line: `test-cm-route`, `test-dagsim`, `test-nvrm-policy`, `test-nvrm-struct`, 173 `test-codegen-f64`, `test-platform-linux-rest` and `test-gpu-resident` run 174 their C and host checks and print `: NOT_RUN` for the step that 175 executes the pinned `omc`. 176 177 ## Omega slice gate 178 179 The eight slices stay in `omega/slices/`: `doorbell.osc`, `sequencer.osc`, 180 `nvrm.osc`, `va.osc`, `open_plan.osc`, `kmod.osc`, `mesa.osc`, `launch.osc`. 181 A missing name fails before any compiler is required. 182 183 The compiler checkout is explicit. There is no default directory. 184 185 ```sh 186 OMEGA_OSC_COMPILER_DIR=/path/to/omega-osc-cubin tests/omega/run.sh 120 187 # or: tests/omega/run.sh 120 /path/to/omega-osc-cubin 188 # or: make test-omega-slices OMEGA_OSC_COMPILER_DIR=/path/to/omega-osc-cubin 189 ``` 190 191 `make test-omega-slices` is not part of `make test`. A fresh checkout has no 192 sibling compiler, so the portable suite only runs the refusal checks. 193 194 The harness must be a clean Git checkout of source commit 195 ``1accb93164ce68a2ac2e2c680acf54782f260d62`` (the pin recorded on 196 `roadmap/15-reproducible-host`). The runner then uses 197 `build/compiler/test_osc_compiler` and builds that target when the binary is 198 absent. Failures: 199 200 | Condition | Exit | Diagnostic | 201 |---|---|---| 202 | `OMEGA_OSC_COMPILER_DIR` unset and no directory argument | 2 | `compiler harness not configured` plus the required commit | 203 | Directory is not a Git checkout | 2 | `harness directory is not a Git checkout` | 204 | `HEAD` is a different commit | 2 | `wrong harness source` with expected and found revisions | 205 | Tracked or untracked changes | 2 | `harness checkout is modified` | 206 | A named slice file is absent | 1 | `missing required slice` and the path | 207 | Binary still absent after the build | 2 | `compiler binary still missing` | 208 209 The 2026-10-22 receipt on that branch recorded an AArch64 binary SHA-256 of 210 ``a007283780347dd4a4b024844dc0c81fc09e0926f27f83e50c07d42508886f23`` and a 211 passing eight-slice run. This tree does not re-measure that binary. A run 212 prints the source commit and the binary SHA-256 of whatever it actually 213 executed. 214 215 ## What is portable, and what is not 216 217 Portable, included in `make test`: 218 219 ```sh 220 make 221 make test 222 make test-omega-slice-runner 223 make test-omega-arch-guard 224 make test-omega-barrier-contract 225 make test-omega-binding-portable 226 build/hello_gpu --sim 227 make doctor 228 ``` 229 230 `make doctor` reads `/proc`, `/sys` and `/dev`. It does not open a GPU. On a 231 machine that is not a DGX Spark it reports the missing pieces. That report is 232 the result. 233 234 Target-only, not a silent pass inside `make test`: 235 236 ```sh 237 make test-omega-slices # needs the pinned OSC compiler above 238 make test-om-encoder # AArch64; seeded encoder binding 239 make test-om-cubin # AArch64; seeded cubin packer 240 make test-gpu-native-runtime # AArch64; seeded native units 241 make test-om-spec-encoder # pinned omc; samples read by Omega's own sm121dis 242 make test-om-spec-encoder-nvdisasm-oracle # same, read by NVIDIA nvdisasm (oracle) 243 make test-om-disasm-mutants # pinned omc and bridge; four .om decoder mutants, each caught by the .om vs C differential 244 make test-sm121dis # pinned omc and nvdisasm; oracle agreement and .om vs C corpus 245 make test-sm121dis-opmove # pinned omc and nvdisasm; BlackwellIR ops 64..79 encoded, read by ours and the oracle 246 make test-portable-receipts # pinned omc 247 make test-model-capacity # pinned omc 248 make test-prof # pinned omc; profiler host and simulator tiers, chip stays NOT_RUN 249 make test-expert-coder # pinned omc; ERC1 expert-weight coder on generated matrices, every negative control (not in make test) 250 make test-expert-coder-mutants # pinned omc; each ERC1 check broken once, the suite must fail each time (not in make test) 251 make test-expert-coder-real # pinned omc and the Qwen3.8-Flash-Next checkpoint; real expert matrices (not in make test) 252 make hello-gpu # GB10, opens the NVIDIA device nodes 253 ./build/gpu__test --out receipt.json 254 ``` 255 256 `make test-gpu-engine-gb10-compile` only compiles the Phase B chip source. It 257 does not run it. `make test-gpu-scan` runs the existing frozen-order reduction 258 host checks and both warp-simulator scheduling orders. Its numeric substrate 259 defaults to the seeded units in `om/numeric/`; retained native C/assembly is 260 an opt-in differential oracle. `make test-gpu-gemm` is the separate GEMM host 261 and simulator target. Neither simulator target opens a GPU. 262 `make test-gpu-scan-mutants` needs `OMEGA_MV` and `OMEGA_BRIDGE_DIR` and is 263 outside `make test`. 264 265 ### Numeric remainder migration 266 267 `make test-numeric-rest-om-diff` compares bulk reference/CPU realization, FTZ, 268 parity and seed traces, patch encoding/checking, launch admission, IEEE 269 predicates and the general reduction hierarchy against the retained C oracle. 270 Non-NaN floats compare by bits; NaNs compare by class. The reducer preserves 271 the declared warp tree at every level, including padding and final MEAN 272 division. Sequential summation is deliberately not that contract. 273 The production numeric archive objects also force `-ffp-contract=off`, including 274 when a caller supplies `CFLAGS`; see the 275 [archive build/control receipt](../evidence/numeric-rest-`20261106`/archive-fp-contract.md). 276 277 `make test-numeric-rest-om-mutants` regenerates disposable copies, requires a 278 passing control, kills six changed Omega algorithms and rejects omission of 279 each of the five strong remainder units at link time. The earlier scalar 280 `test-numeric-om-diff` and `test-numeric-om-mutants` remain unchanged contracts. 281 Set `OMEGA_OMC` and `OMEGA_BRIDGE` to the pins checked by `om/units.sh`. 282 283 The independent native implementations compile only with 284 `CUDAPP_MIGRATION_PENDING_C_NUMERIC_REST` (oracle-only) or 285 `CUDAPP_MIGRATION_PENDING_C_NUMERIC_REST_DIFF` (both implementations, distinct 286 symbols). The default has no weak-symbol fallback. C adapters transport 287 bits/addresses, allocate reduction buffers and render diagnostics; the `.om` 288 units decide the computation and admission. 289 290 On the shared Spark, run every command above under: 291 `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10`. 292 Build with at most `-j3`. These checks are host/simulator evidence only; the 293 chip runbook and limitations are in 294 [`numeric-rest-`20261106``](../evidence/numeric-rest-`20261106`/README.md). 295 296 An AArch64 host build of this tree keeps `dsb sy` in `nvrm_cpu_barrier`. A 297 GB10 run of the device path is a separate receipt. A host or simulator pass 298 does not qualify it. 299 300 ## QMMA builder migration 301 302 `make test-codegen-qmma-diff` is host-only and part of `make test`. The default 303 QMMA probe, peak and F2E4 probe builders execute `om/codegen/cg_qmma.om` 304 through checked portable Omega IR replay. `cg_qmma_patch.om` owns placeholder 305 validation and rewriting. `CUDAPP_MIGRATION_PENDING_C_CODEGEN_QMMA=1` selects 306 the old C oracle; it defaults to zero. 307 308 The differential is **exhaustive over structure, bit-basis over niter**. 309 For every supported peak chain count, issue stall and thread count it tests 310 the unique union of `{1,7,UINT32_MAX}` and 311 `{2^k,2^k-1,2^k+1 | k=0..31}`. Zero is a matched refusal. 312 It also checks both probe variants at every supported wait count and F2E4. 313 Each accepted case compares encoded bytes, patched bytes, patch counts and 314 packed cubins between C and Omega. For each structural configuration, both 315 implementations' patched bytes must differ from their niter=7 baseline only 316 in the same MOVI word-1 immediate field, whose decoded value must equal niter. 317 The field is located from the baseline IR, not a hard-coded instruction index. 318 A parity-dependent stall mutant must fail this confinement check independently 319 of C/Omega equality; a separate corrupted-control-word mutant must fail byte equality. 320 Unsupported configurations, null outputs, corrupt placeholders and short 321 buffers are also compared with C. 322 323 Source-level scalar dependence: `src/omega_blackwell_codegen_qmma.c:110-122` 324 rejects zero and copies `iters` only into `movi(e,cnt,iters)`. 325 On the peak path, `om/codegen/cg_qmma.om:416-419` copies the scalar into spec 326 slot 1, `:98-101` rejects zero, and `:294-297` copies it into the single MOVI 327 immediate. No other peak emission depends on that scalar. The executable 328 confinement checks strengthen this source argument; they do not claim literal 329 enumeration of every uint32 iteration count. 330 331 Domain query: 332 `WolframLanguageEvaluator: v=Union[Join[{1,7,2^32-1},Flatten[Table[{2^k,2^k-1,2^k+1},{k,0,31}]]]]; {Length[v],Count[v,_?(#>0&)],Length[v]*16*15*32}` 333 → `{94,93,721920}` (including the refused-zero probes). 334 The strengthened matrix/confinement target is **NOT_RUN** to completion: 335 its focused run was cancelled at the operator's wrap-up directive. The initial 336 receipt below predates this strengthening and must not be cited as its PASS. 337 Initial pre-confinement receipt: 338 The focused command exited zero and printed 339 `CODEGEN QMMA DIFF PASS (7748 cases)` on 2026-11-06, after printing 340 `CODEGEN QMMA MUTANT CAUGHT`. This is host parity, not chip qualification. 341 `make test-codegen-qmma-host` also exited zero on 2026-11-06 UTC: 342 the patch oracle-bit self-test and model checks passed, ending 343 `GPU_QMMA_PROBE: PASS`. 344 345 Constants were transcribed from the existing C oracle and checked with 346 `WolframLanguageEvaluator: AssociationMap[FromDigits[#,16]&,{"`51303832`","`46453433`","`38383838`","fc000","358","380","388","ffff","7209","723e","`07800000`","`048070ff`","723c","727a","41800","2c00","`ffffff00`","`ffff0000`"}]` 347 → respectively 348 ``1362114610`,`1178940467`,`943208504`,`1032192`,856,896,904,65535,29193,29246,`125829120`,`75526399`,29244,29306,268288,11264,`4294967040`,`4294901760``. 349 350 Chip tier is **NOT_RUN**. In a separately authorized exclusive GB10 window, 351 build `taskset -c 10-14 nice -n 10 make -j3 build/gpu_qmma_probe_test`, 352 then run `./build/gpu_qmma_probe_test --host-only` and 353 `./build/gpu_qmma_probe_test` using that window's required device authorization 354 and receipt capture procedure. The default command exercises arithmetic, 355 the dropped-C negative control, and the peak sweep. Do not run it outside 356 that window. 357 358 ## Tiled BF16 training GEMM builder migration 359 360 The default `omega_blackwell_codegen_tgemm_prog` executes the first-party 361 `cg_tgemm.om` builder and `cg_tgemm_spec.om` admission/query unit through 362 checked portable IR replay. `cg_tgemm_emit.om` shares the QMMA allocator, 363 record packer and scoreboard-control primitives. The old C oracle remains 364 behind `CUDAPP_MIGRATION_PENDING_C_CODEGEN_TGEMM=1`, default zero. 365 Native portable view lengths count elements, not bytes. 366 367 `make test-codegen-tgemm-diff` checks every structural shape and supported 368 mutant along the full independent K and N axes, compares all public query 369 results and refusals, and compares complete IR plus allocator state. 370 Each structural baseline also compares encoded bytes and packed cubins. 371 Equal complete IR and allocator state feed the same deterministic encoder; 372 this is stronger than comparing only encoded bytes. 373 The independent-axes command is not an exhaustive Cartesian-product receipt. 374 `make test-codegen-tgemm-exhaustive` visits the complete supported bounded 375 K/N/RT/warps/AQN/mutant product, including C refusals. 376 Both modes require detection of an independently corrupted Omega control word. 377 `make test-codegen-tgemm-sim` runs the carried budget checks and warp simulator 378 with its arithmetic reference and mutant controls; it opens no GPU. 379 380 Host receipt (2026-11-06 UTC, pinned `omc` `e5b32567` and Bridge `bc11b30b`): 381 `taskset -c 10-14 nice -n 10 make -j3 test-codegen-tgemm-diff` 382 returned zero with `CODEGEN TGEMM MUTANT CAUGHT` and 383 `CODEGEN TGEMM AXES DIFF PASS (55295 accepted cases)`. 384 The printed first-instruction control-word mismatch belongs to the deliberate 385 mutant, not a positive-case failure. The carried reference command 386 `taskset -c 10-14 nice -n 10 make -j3 test-codegen-qmma-host test-codegen-tgemm-sim` 387 also exited zero on 2026-11-06 UTC. QMMA ended `GPU_QMMA_PROBE: PASS`; 388 TGEMM budget checks ended `GPU_TGEMM: PASS`; TGEMM simulation ended 389 `GPU_TGEMM: PASS`, with both fragment orders matching the arithmetic reference 390 and mutants 1–4 caught. Full-product and chip verdicts remain separate. 391 392 Constant transcription query: 393 `WolframLanguageEvaluator: {AssociationMap[FromDigits[#,16]&,{"21","25","26","d8","100","10000","`ffff0000`","fffffffe"}],2^32,2^17,2^23}` 394 → `{<|"21"->33,"25"->37,"26"->38,"d8"->216,"100"->256,"10000"->65536,"`ffff0000`"->`4294901760`,"fffffffe"->`4294967294`|>,`4294967296`,131072,`8388608`}`. 395 396 Chip tier is **NOT_RUN**. In a separately authorized exclusive GB10 window, 397 build `taskset -c 10-14 nice -n 10 make -j3 build/gpu_tgemm_test`, 398 run `./build/gpu_tgemm_test --host-only` and 399 `./build/gpu_tgemm_test --sim`, then capture 400 `./build/gpu_tgemm_test --chip` under the current device authorization and 401 receipt procedure. Only the last command opens the device. Its carried chip 402 path checks both uncached and cached buffers, output poisoning, repeat 403 identity, arithmetic reference and mutant 4. Host parity is not chip qualification. 404 405 ## Seeded attention IR builders 406 407 The decode and tensor-prefill attention builders use 408 `om/codegen/cg_attn*.om` and `om/codegen/cg_pattn*.om` by default. Omega owns 409 configuration loops, RMSNorm/RoPE instruction selection, scoreboard scheduling, 410 branch fixups, and loop metadata. The C adapter only validates the public spec 411 and invokes `omega_gpu_om_ir_replay`; the public headers are unchanged. 412 413 The original builders remain differential oracles behind 414 `CUDAPP_MIGRATION_PENDING_C_CODEGEN_ATTN` and 415 `CUDAPP_MIGRATION_PENDING_C_CODEGEN_PATTN` (both off by default). 416 `make test-codegen-attn`, carried by `make test`, builds those oracles separately 417 and enumerates every accepted spec: decode depth 1 through 4 and mutant 0 through 418 4; prefill warps 4 or 8 and mutant 0 through 4, with FUSED/APPEND/ATTEND and 419 mirror permitted only for APPEND. These spec guards define a finite complete 420 accepted space; invalid-boundary and null cases are checked separately. 421 422 The differential checks the full IR, register allocation, and padded encoded 423 bytes. Every accepted spec also runs a one-record negative control and an 424 Omega scheduling mutant (`kind=1`, changing the first load's stall). 425 Production adapters always use `kind=0`. Runtime launch parameters, including 426 sequence length and pointer addresses, do not change the generated program. 427 428 Regenerate and check the committed bridge output with the pins in 429 `om/units.sh`: 430 431 ```sh 432 OMEGA_OMC=/path/to/omega-mv/seed/out/omc \ 433 OMEGA_BRIDGE=/path/to/omega-bridge sh om/units.sh 434 OMEGA_OMC=/path/to/omega-mv/seed/out/omc \ 435 OMEGA_BRIDGE=/path/to/omega-bridge sh om/units.sh --check 436 make test-codegen-attn 437 build/gpu_decode_attn_test --host-only 438 build/gpu_decode_attn_test --sim 439 build/gpu_prefill_attn_test --host-only 440 build/gpu_prefill_attn_test --sim 441 ``` 442 443 The compiler pin is omega-mv ``e5b32567``, as checked by `om/units.sh`. These are 444 host/simulator checks, not chip qualification. A separately authorized GB10 445 window is required before running either test binary without `--host-only` or 446 `--sim`. During that window, follow the current hardware authorization and 447 service-safety procedure, then run `build/gpu_decode_attn_test --out decode.json` 448 and `build/gpu_prefill_attn_test --out prefill.json`. Both default modes open the 449 GPU; neither is run by the migration tests. Preserve the receipts separately 450 from the host evidence and perform the window's required closeout checks. 451 452 ## Prefill host-work builders in Omega 453 454 Router logits and MoE weighted combine default to `om/codegen/cg_pfhost*.om`. 455 `CUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST=1` selects the retained C builder 456 oracle; it is off by default. Public APIs and spec layouts are unchanged. 457 The Omega phases construct the records, virtual-register shapes, schedule, 458 loop boundaries and branch displacements. C only replays the generic tape. 459 460 ```sh 461 make test-codegen-pfhost 462 make build/gpu_pfhost_test 463 build/gpu_pfhost_test --sim 464 ``` 465 466 The differential enumerates every `k`, `e`, `t`, `h`, `top_k` and mutant 467 selector accepted by the C spec validators. It compares return values, every 468 IR field, solved register allocation and encoded bytes, including configurations 469 whose builders refuse. A flipped instruction is the comparator's negative 470 control. Separate router-address and combine-address Omega source mutants 471 are regenerated with the pinned compiler and converter, linked in isolation, 472 and must fail the same differential. Generation requires `OMEGA_OMC` and 473 `OMEGA_BRIDGE` as documented above; it does not install a fallback compiler. 474 Without an executable pinned compiler on non-AArch64 hosts, source mutation 475 checks are `NOT_RUN`; the exhaustive checked-C differential still runs. 476 The existing simulator checks both warp scheduling orders and the numerical 477 mutants against the host references. 478 479 Chip qualification is separate and needs a current exclusive GPU window. 480 Only after obtaining that authorization, build `build/gpu_pfhost_test` and 481 run its `--chip` mode using the current machine's window procedure. Never 482 interpret the host differential or simulator as a hardware receipt. 483 484 ## FP8 MoE builder migration 485 486 `make test-codegen-moe-diff test-codegen-moe-sim` is host-only and carried by 487 `make test`. The default MoE step/deep and row-pipelined builders execute 488 `om/codegen/cg_moe*.om` using the existing checked Omega IR replay. 489 `cg_moe_sched.om` owns the optional physical-register stall pass. The public 490 headers are unchanged. `CUDAPP_MIGRATION_PENDING_C_CODEGEN_MOE=1` and 491 `CUDAPP_MIGRATION_PENDING_C_CODEGEN_MOE2=1` select independent handwritten C 492 oracles; both default to zero. 493 494 The differential exhausts the structural domain accepted by the C guards, 495 including every supported mutation selector, and compares exact return codes, 496 IR/allocation state, SASS and packed cubin bytes in memory. Variant 2 ignores 497 the four free uint32 depth/scheduling/coalescing/weight-first fields: every bit 498 and all-ones are checked independently for every accepted structural tuple, 499 not the entire uint32 Cartesian product. Boundary and bit-basis invalid 500 inputs must retain the C rejection code. A corrupted record must be caught. 501 502 The differential covers the plain entry points only (the domain the frozen C guards accept). The ragged-K entry points 503 (`omega_blackwell_codegen_fp8_gemv_ragged_prog`, any k that is a multiple of 128 and not of `32 * lane_bytes`) have no C oracle: 504 they are checked by the simulator, the double-precision oracle and their own source mutants (see the Flash-Next section below), 505 and by a direct comparison of base and head output on every spec the plain entry points accept. 506 507 `python3 om/codegen/moe_mutants.py` (with `OMEGA_OMC` and `OMEGA_BRIDGE` set) 508 requires each altered Omega source to compile and then fail the ordinary 509 differential. `tests/codegen_moe_sim_test.c` uses `bw_warp_sim_k.h` against an 510 independent all-one e4m3 reference, both builders and fragment/warp orders, 511 with a scale-drop negative control. Neither host path opens a device or 512 models scoreboard timing. The exact structural domain, compiler pin, 513 arithmetic provenance and separately authorized chip runbook are in 514 `evidence/codegen-moe-`20261106`/REPORT.md`. Chip qualification is **NOT_RUN**. 515 Launch these host checks inside the device-free namespace: 516 `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 `. 517 This also isolates the mutation runner's child builds and test processes. 518 ## API-rest seeded runtime views 519 520 The API-rest migration uses omega-bridge ``79e8c36`` runtime views and the seeded 521 compiler SHA-256 ``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``. 522 The handwritten algorithms live in `om/apirest/`; generated checked C is a 523 bridge artifact, not a second handwritten implementation. Canonical MoE 524 fragment packing and row compaction come from `om/codegen/cg_pack_len.om`, 525 `cg_pack_h.om` and `cg_mrow.om`. Their byte/element extents are distinct: 526 packing accepts source bytes and destination ushort elements; compaction 527 accepts source/destination f32 elements. Runtime views refuse read/edit overlap. 528 Four tern segments require four endpoint and scale elements, even though the 529 launch contains only three interior boundaries. 530 531 Run each command through this isolation prefix on the shared Spark: 532 533 ```sh 534 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 sh tests/api_rest_run.sh 535 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/api_rest_mutants.py 536 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 env OMEGA_ROOT=/path/to/pinned/omega-mv sh tests/api_rest_families.sh 537 ``` 538 539 The mutant runner also requires `OMEGA_OMC`, `OMEGA_SEED` and `OMEGA_BRIDGE` 540 as used by `om/units.sh`. The family runner builds at most three jobs, links 541 the standalone tgemm test and the external tern algebra oracle, and runs only 542 host/simulator modes. It preincludes the current CUDApp simulator for the 543 external tern test: allowing that test's quoted include to select its stale 544 external simulator gives false row-major failures. None of these receipts 545 qualifies the GPU. 546 547 `tests/api_rest_diff.c` and `tests/api_rest_partitions.h` contain independent 548 source-loop oracles, checked-view refusal cases and deliberately corrupted 549 controls. `tests/api_rest_bench.c` records three host samples for matched 550 packing, compaction, descriptors, FP8 rows, permutation/gather, tern packing, 551 slot transitions and prefill copy/ratios. The FP8 Omega reference uses 552 separate f64 accumulator/magnitude passes; its measured cost is reported, not 553 hidden by replacing it with the original C reference. Benchmark medians and 554 ratios must be evaluated by Wolfram, with the query retained in the receipt. 555 556 ## MoE shapes of Qwen3.8-Flash-Next (host only, chip NOT_RUN) 557 558 Hidden 2560, 512 routed experts, 10 picks plus the shared expert (11 contributions), expert intermediate 640, E4M3 bytes with BF16 559 `weight_scale_inv` in 128 x 128 blocks. Receipts: `evidence/FLASH-NEXT-MOE-SHAPES-`20261118`/`. Every command runs through the device-free 560 wrapper of `evidence/codegen-moe-`20261106`/REPORT.md`; none opens a device. 561 562 - `make test-codegen-moe-ragged test-fp8-ragged-api test-codegen-dec-group-sim` (all in `make test`): the ragged-K FP8 GEMV 563 (`omega_blackwell_codegen_fp8_gemv_ragged_prog`, k a multiple of 128 and not of 32 * lane_bytes, for example the expert down_proj k = 640) 564 on the warp simulator against the double-precision oracle, its negative controls, the API selection and the seeded host-policy op 25 565 against its frozen C oracle, and the GROUP kernel at S = 9 and S = 11 with 512 experts. 566 - `make test-moe-wide` (`NOT_RUN`, exit 2, without the pinned toolchain; not part of the portable suite) and `make test-moe-wide-mutants`: the 567 `_wide` planning, serializer, GROUP-request, window and admission units (`om/moe/*_wide.om`). 568 - `make test-codegen-moe-ragged-mutants`: source mutants of the ragged builder and policy, each killed by wrong results. 569 - `make test-flash-expert-real` (needs the checkpoint and `python3`; `NOT_RUN` without them): one routed expert of one layer read from disk 570 and compared with an independent Python float64 computation. 571 572 A host simulator result is not a chip result. The simulator runs at most 8 warps per CTA; the launch uses 32.