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

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
3This receipt belongs to branch `feat/omega-codegen-tern`, based on the shared
4replay interface in `feat/omega-codegen-a` at `89ee4db` (draft #275).
5The public ternary header is untouched. PR #229 changes only its QMD-cap comment;
6it changes no builder-read field, so the exhaustive accepted domain covers both
7merge 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
19All build/run commands use `taskset -c 10-14 nice -n 10`, at most `make -j3`.
20See `om/codegen/TERN.md` for environment variables and reproducible commands.
21No chip authorization, device access, service changes, or deployment are part
22of 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
33The simulator uses CUDApp's existing `tests/bw_warp_sim_k.h` and the pinned
34Omega ternary/algebra battery. The pinned Omega simulator itself ignores the
35scalar LDG immediate; using that older simulator produced the same 14 failing
36row-major cases for both C and Omega builders. CUDApp already contains the
37correct immediate-aware load semantics. The adapter pre-includes that current
38simulator, without editing either simulator or weakening the battery. The
39simulator's shipped mutants 1, 3 and 2 were detected.
40
41`mutants-all-shapes.log`, `units-check.log`, and `simulator.log` retain the current
42focused output. The earlier `mutants.log` preserves the initial smaller point
43set and substitutes environment-variable names for workspace prefixes; other
44logs retain commands as executed. The expanded source-mutation gate crosses
45every supported (layout, rows) shape with both output paths and epilogues,
46then exercises multi-step unrolling, deep streaming, and chunked input.
47`simulator-pinned-omega-failed.log` preserves the initial failed run against the
48superseded simulator rather than presenting it as a passing gate.
49
50## Exhaustive differential and full host attempt
51
52The full host run exercised `./build/codegen_tern_diff_test` to completion:
53
54```
55CODEGEN TERN RECORD NEGATIVE CONTROL CAUGHT
56CODEGEN TERN DIFF PASS (213120 programs, 14258 refusals)
57```
58
59The enclosing command was:
60
61```
62set -o pipefail
63taskset -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
70It 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
72pre-migration C source line. The actual failure was:
73
74```
75FAIL: qmma_reader: src/omega_blackwell_codegen_qmma.c:42 does not contain 'nop(e, 15)'
76make: *** [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
81tool transcript. No `CUDA++ HOST TESTS PASS` final line was observed.
82The integration owner runs the final integrated full-host gate after the
83source-contract repair; this receipt does not turn that unrun gate into PASS.
84
85## Latency source-contract repair
86
87The 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
96The checker still executes `diff_nak.py --check`. Omega statements match
97exactly, with the adjacent NOP initialization/emission and preceding tensor
98stall also checked. Its self-check runs wrong-line, zero-stall and
99digit-appended-stall source controls for both tensor readers. All are rejected;
100the wrong-line and changed-source cases use the real checker, not a second
101matching implementation. Temporary source mutants are cleaned automatically.
102
103The requested red run on the unfixed lane tree returned **rc 1**, exactly the
104stale QMMA assertion shown above (`latmeas-red.log`). The repaired green run
105returned **rc 0** and ended `latmeas host self-test PASS`
106(`latmeas-green.log`). The final green command used the new mandatory wrapper:
107
108```
109bwrap --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
114The working directory was a disposable verification worktree, not the active
115integration tree. Its source fixture was integration
116`071ad44ed5628a065fe0efe298124df3a52d4eb0`, with only the cited default-source
117files taken from:
118
119- `om/codegen/cg_tc.om`:
120 `57b19749567118e0400800ba9c10191ca627a499` (draft #278).
121- `src/omega_numeric.c`:
122 `1b78bfe99aba346e68274e4922f60791456295ab` (draft #288).
123
124It used the existing lane host-test binary and the repaired checker/catalog.
125This deliberately verifies the integration-only source contract without
126merging unrelated lanes into #279. The isolated repair commit must be consumed
127with those source revisions; the older #275-only base lacks `cg_tc.om`.
128
129The full-host attempt, ternary gates and initial red run predate the device-free
130namespace rule. One initial green also finished before that rule was received;
131the green result quoted here is the subsequent device-free run. No old result
132is relabeled as having used the wrapper. Future tests use the wrapper above.
133This host-only source-contract gate does not qualify or launch hardware.
134
135## Final device-free ternary acceptance
136
137After documenting the namespace requirement, all focused ternary examples were
138exercised again, serially inside one device-free namespace:
139
140```
141bwrap --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
150Observed command **rc 0**. `device-free-focused.log` retains the full output:
151
152```
153PASS portable Omega units regenerate byte for byte
154CODEGEN TERN RECORD NEGATIVE CONTROL CAUGHT
155CODEGEN TERN DIFF PASS (213120 programs, 14258 refusals)
156CODEGEN TERN OMEGA MUTANTS PASS (68 source-mutant/config controls)
157CODEGEN TERN SIM: 34 checks, 0 failed: PASS
158```
159
160These are new device-free runs, not a relabeling of earlier evidence. The full
161integrated suite remains the integration owner's gate; no second private full
162suite was launched. The disposable latency verification worktree and temporary
163generation environment have been removed. No owned acceptance process remains.
164
165## Numeric encoding checks
166WolframLanguageEvaluator:
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
170WolframLanguageEvaluator: `BitXor[2147516416,1]` → `2147516417`
171(the builder-bias source mutation).
172
173WolframLanguageEvaluator:
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}}`.