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/evidence/codegen-tern-20261106/README.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 / evidence / codegen-tern-20261106 / README.md` 175 lines · 8637 bytes Raw Blame History Rendered 1 # Ternary seeded Omega migration — 2026-11-06 2 3 This receipt belongs to branch `feat/omega-codegen-tern`, based on the shared 4 replay interface in `feat/omega-codegen-a` at ``89ee4db`` (draft #275). 5 The public ternary header is untouched. PR #229 changes only its QMD-cap comment; 6 it changes no builder-read field, so the exhaustive accepted domain covers both 7 merge orders. 8 9 ## Verification inputs 10 11 - Omega source: ``e5b32567a7aff3ce594e3254a622a846a6cd190b``. 12 - Seeded omc SHA-256: ``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``. 13 - Omega bridge source: ``bc11b30b1faa9af8b875ae6fec24e5f49cf03ac4``. 14 - Converter/frontend content pins are checked by `om/units.sh` before regeneration. 15 - The simulator adapter checks the Omega revision and rejects modified input 16 fixture/algebra-oracle files. It invokes only `sim_battery`, not the original 17 device-capable command-line entry point. 18 19 All build/run commands use `taskset -c 10-14 nice -n 10`, at most `make -j3`. 20 See `om/codegen/TERN.md` for environment variables and reproducible commands. 21 No chip authorization, device access, service changes, or deployment are part 22 of this receipt. Chip tier is **NOT_RUN**. 23 24 25 ## Exercised focused gates 26 27 | Gate | Command after the stated affinity/nice prefix | rc | Observed final line | 28 |---|---|---|---| 29 | Reproducible units | `sh om/units.sh --check` | 0 | `PASS portable Omega units regenerate byte for byte` | 30 | Omega source mutants | `make -j3 test-codegen-tern-mutants` | 0 | `CODEGEN TERN OMEGA MUTANTS PASS (68 source-mutant/config controls)` | 31 | Current warp simulator | `make -j3 test-codegen-tern-sim` | 0 | `CODEGEN TERN SIM: 34 checks, 0 failed: PASS` | 32 33 The simulator uses CUDApp's existing `tests/bw_warp_sim_k.h` and the pinned 34 Omega ternary/algebra battery. The pinned Omega simulator itself ignores the 35 scalar LDG immediate; using that older simulator produced the same 14 failing 36 row-major cases for both C and Omega builders. CUDApp already contains the 37 correct immediate-aware load semantics. The adapter pre-includes that current 38 simulator, without editing either simulator or weakening the battery. The 39 simulator's shipped mutants 1, 3 and 2 were detected. 40 41 `mutants-all-shapes.log`, `units-check.log`, and `simulator.log` retain the current 42 focused output. The earlier `mutants.log` preserves the initial smaller point 43 set and substitutes environment-variable names for workspace prefixes; other 44 logs retain commands as executed. The expanded source-mutation gate crosses 45 every supported (layout, rows) shape with both output paths and epilogues, 46 then exercises multi-step unrolling, deep streaming, and chunked input. 47 `simulator-pinned-omega-failed.log` preserves the initial failed run against the 48 superseded simulator rather than presenting it as a passing gate. 49 50 ## Exhaustive differential and full host attempt 51 52 The full host run exercised `./build/codegen_tern_diff_test` to completion: 53 54 ``` 55 CODEGEN TERN RECORD NEGATIVE CONTROL CAUGHT 56 CODEGEN TERN DIFF PASS (213120 programs, 14258 refusals) 57 ``` 58 59 The enclosing command was: 60 61 ``` 62 set -o pipefail 63 taskset -c 10-14 nice -n 10 env \ 64 OMEGA_OMC=/home/drakestapleton/work/cudastack/omega-mv/seed/out/omc \ 65 OMEGA_BRIDGE=/home/drakestapleton/work/cudastack/omega-bridge \ 66 OMEGA_MV=/home/drakestapleton/work/cudastack/omega-mv \ 67 make -j3 test | tee evidence/codegen-tern-`20261106`/full-host.log 68 ``` 69 70 It finished with **rc 2**, not a timeout or interruption. Full-host tier is 71 **FAIL**: `tools/latmeas/catalog.json` still pointed `qmma_reader` at the 72 pre-migration C source line. The actual failure was: 73 74 ``` 75 FAIL: qmma_reader: src/omega_blackwell_codegen_qmma.c:42 does not contain 'nop(e, 15)' 76 make: *** [Makefile:174: test-gpu-latmeas] Error 1 77 ``` 78 79 `full-host.log` retains stdout, including the completed exhaustive differential; 80 `full-host-failure.log` retains the combined-output failure excerpt from the 81 tool transcript. No `CUDA++ HOST TESTS PASS` final line was observed. 82 The integration owner runs the final integrated full-host gate after the 83 source-contract repair; this receipt does not turn that unrun gate into PASS. 84 85 ## Latency source-contract repair 86 87 The isolated repair updates all catalog anchors affected by the current lanes: 88 89 - QMMA reader: `om/codegen/cg_qmma.om:257`, exact `put x 7 15`. 90 - HMMA reader: `om/codegen/cg_tc.om:913`, exact `put x 7 ulong 14`. 91 - Numeric minimum: `src/omega_numeric.c:1258`, 92 `CTRL_STALL(p[t].w[3]) < 5u`, rather than the moved comment. 93 - Elementwise and attention fixed-stall policies remain in their existing C 94 emitters at the cataloged lines; their migration lanes did not move them. 95 96 The checker still executes `diff_nak.py --check`. Omega statements match 97 exactly, with the adjacent NOP initialization/emission and preceding tensor 98 stall also checked. Its self-check runs wrong-line, zero-stall and 99 digit-appended-stall source controls for both tensor readers. All are rejected; 100 the wrong-line and changed-source cases use the real checker, not a second 101 matching implementation. Temporary source mutants are cleaned automatically. 102 103 The requested red run on the unfixed lane tree returned **rc 1**, exactly the 104 stale QMMA assertion shown above (`latmeas-red.log`). The repaired green run 105 returned **rc 0** and ended `latmeas host self-test PASS` 106 (`latmeas-green.log`). The final green command used the new mandatory wrapper: 107 108 ``` 109 bwrap --dev-bind / / --dev /dev --proc /proc -- \ 110 taskset -c 10-14 nice -n 10 sh tools/latmeas/selftest.sh \ 111 /home/drakestapleton/work/cudastack/lanes/CodegenTern/build/gpu_latmeas_test 112 ``` 113 114 The working directory was a disposable verification worktree, not the active 115 integration tree. Its source fixture was integration 116 ``071ad44ed5628a065fe0efe298124df3a52d4eb0``, with only the cited default-source 117 files taken from: 118 119 - `om/codegen/cg_tc.om`: 120 ``57b19749567118e0400800ba9c10191ca627a499`` (draft #278). 121 - `src/omega_numeric.c`: 122 ``1b78bfe99aba346e68274e4922f60791456295ab`` (draft #288). 123 124 It used the existing lane host-test binary and the repaired checker/catalog. 125 This deliberately verifies the integration-only source contract without 126 merging unrelated lanes into #279. The isolated repair commit must be consumed 127 with those source revisions; the older #275-only base lacks `cg_tc.om`. 128 129 The full-host attempt, ternary gates and initial red run predate the device-free 130 namespace rule. One initial green also finished before that rule was received; 131 the green result quoted here is the subsequent device-free run. No old result 132 is relabeled as having used the wrapper. Future tests use the wrapper above. 133 This host-only source-contract gate does not qualify or launch hardware. 134 135 ## Final device-free ternary acceptance 136 137 After documenting the namespace requirement, all focused ternary examples were 138 exercised again, serially inside one device-free namespace: 139 140 ``` 141 bwrap --dev-bind / / --dev /dev --proc /proc -- \ 142 taskset -c 10-14 nice -n 10 env \ 143 OMEGA_OMC=/home/drakestapleton/work/cudastack/omega-mv/seed/out/omc \ 144 OMEGA_BRIDGE=/home/drakestapleton/work/cudastack/omega-bridge \ 145 OMEGA_MV=/home/drakestapleton/work/cudastack/omega-mv \ 146 OMEGA_BRIDGE_DIR=/home/drakestapleton/work/cudastack/omega-bridge \ 147 sh -c 'sh om/units.sh --check && make -j3 test-codegen-tern-diff && python3 om/codegen/tern_mutants.py && make -j3 test-codegen-tern-sim' 148 ``` 149 150 Observed command **rc 0**. `device-free-focused.log` retains the full output: 151 152 ``` 153 PASS portable Omega units regenerate byte for byte 154 CODEGEN TERN RECORD NEGATIVE CONTROL CAUGHT 155 CODEGEN TERN DIFF PASS (213120 programs, 14258 refusals) 156 CODEGEN TERN OMEGA MUTANTS PASS (68 source-mutant/config controls) 157 CODEGEN TERN SIM: 34 checks, 0 failed: PASS 158 ``` 159 160 These are new device-free runs, not a relabeling of earlier evidence. The full 161 integrated suite remains the integration owner's gate; no second private full 162 suite was launched. The disposable latency verification worktree and temporary 163 generation environment have been removed. No owned acceptance process remains. 164 165 ## Numeric encoding checks 166 WolframLanguageEvaluator: 167 `{BitAnd[2^32-1,BitNot[BitShiftLeft[15,9]]],BitShiftLeft[2^32-1,32]}` 168 → `{`4294959615`,`18446744069414584320`}` (stall-field clear mask and high-word mask). 169 170 WolframLanguageEvaluator: `BitXor[`2147516416`,1]` → ``2147516417`` 171 (the builder-bias source mutation). 172 173 WolframLanguageEvaluator: 174 `{FromDigits["`80008000`",16],FromDigits["fffffffe",16],FromDigits["`00010001`",16],FromDigits["`00020002`",16],FromDigits["358",16],Table[FromDigits[x,16],{x,{"380","388","390","398","3a0","3a8","3ac","3b0","3b4"}}]}` 175 → `{`2147516416`,`4294967294`,65537,131074,856,{896,904,912,920,928,936,940,944,948}}`.