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 / standalone-oracles-20261106 / README.md

246 lines · 14124 bytes Raw Blame History Rendered
1# Standalone oracle migration — 2026-11-06
2
3## Scope and verdicts
4
5IMPLEMENTED: the eight Lane 23 checker programs use the seeded
6`om/standalone-oracles/oracles.om` unit by default for integer/float fixture
7construction, shape/budget policy, reference BF16 accumulation, error thresholds,
8finite/class checks, comparisons and verdict aggregation. The former C scalar
9implementation is available only with the default-OFF
10`CUDAPP_MIGRATION_PENDING_C_STANDALONE_ORACLES=1` verification flag.
11`omega_so_oracles` is a strong reference; removing its implementation fails linking.
12Driver calls, byte transport, filesystem/clock effects and independent numerical
13oracles remain C. No public API changed.
14
15EXERCISED: host scalar differential PASS; all eight host checker before/after
16comparisons PASS; eight red controls rejected; nine compiled Omega source mutants
17killed; focused attention, prefill and q38 host/simulator gates PASS; C0 static
18admission and fixture reproducibility PASS.
19
20QUALIFIED: chip/live-RM/VFIO/hardware **NOT_RUN**, no authorized GPU window.
21MERGED: no. DEPLOYED: no. This receipt does not qualify a driver, CUDA loader,
22physical kernel or replacement GPU runtime.
23
24Base source revision: `b774723f537cec16a359fe082b8100317a5b5490`.
25The first branch commit, `b6ddd225`, registers the unit before the caller cutover.
26See the PR head for the final implementation revision; this receipt is committed
27with that implementation rather than claiming a self-referential commit hash.
28
29**binary128 oracle stays C: seeded Omega has no binary128 type; proposal = f128 soft type or u64-pair arithmetic in om/numeric**
30
31The preserved `long double` computations in q38 `check.c` and `norm-check.c`
32are explicitly marked independent binary128 reference oracles. This host reports
33`__LDBL_MANT_DIG__=113` (see `identities.log`). They are not silently lowered to
34binary64. Their high-precision reference arithmetic/comparison remains C; the
35representable f32/f64/integer policy and boolean aggregation is Omega. Existing
36`ldexpf`, `sqrtl`, `fabsl`, `fmaxl`, `isfinite` and related libm reference operations
37remain host-library oracles, not a new Omega production dependency. Historical
38`om/q38-head/envelope-validation.json` is untouched and is not a qualification
39receipt for this change.
40
41## Pins and tools
42
43- omc source: omega-mv `e5b32567`; executable SHA-256
44 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`.
45- Existing bridge converter SHA-256:
46 `69d629df170a24ba0c2cb6d41dbfaed520e248e0d723236dd32abf0581524d84`.
47- Existing bridge frontend SHA-256:
48 `23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37`.
49- Final Omega source SHA-256:
50 `07b7193434753f3a0ee54f9aaa1c9a3c3bdebc298fbb5dfdf3ead34604e905a3`.
51- Final generated C SHA-256:
52 `f5310a8a0e6d9ed9a875c09d1894f7430190d2556e1ddee0d35d09852fdea2c8`.
53- Host verification tools measured in `identities.log`: GCC 13.3.0,
54 aarch64-linux-gnu, Python 3.12.3. CUDA header identity is CUDA_VERSION=13000;
55 headers and link-only fixture stubs do not authorize or execute a GPU call.
56- Generated bridge C is committed with the normal `om/units.sh` identity records.
57 Native/reference float compilation uses `-ffp-contract=off`.
58
59## Commands actually run
60
61Commands below ran from the lane worktree. Every test, simulator and mutant was
62inside `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10`.
63No full `make test`, GPU probe, live-RM test or service operation ran.
64
65```sh
66export OMEGA_OMC="$HOME/work/cudastack/omega-mv/seed/out/omc"
67export OMEGA_BRIDGE="$HOME/work/cudastack/omega-bridge"
68# Generation/build only:
69taskset -c 10-14 env OMEGA_OMC="$OMEGA_OMC" OMEGA_BRIDGE="$OMEGA_BRIDGE" sh om/units.sh
70taskset -c 10-14 sh compat/cuda/build.sh /tmp/standalone-v2-final
71
72# Final documented focused targets (focused.log):
73bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 \
74 env OMEGA_OMC="$OMEGA_OMC" OMEGA_BRIDGE="$OMEGA_BRIDGE" \
75 make -s -j3 test-standalone-oracles test-standalone-oracles-family \
76 test-standalone-oracles-mutants test-attention-mirror-dispatch test-prefill-scoped
77
78# Original source, default Omega and C snapshot (family.log):
79bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 \
80 python3 om/standalone-oracles/family-check.py build/libomega_gpu.a \
81 --frame build/q38-head/bounds.frame --base b774723f537cec16a359fe082b8100317a5b5490
82
83# Broader unchanged production prefill host/simulator gates (prefill.log):
84bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 \
85 env OMEGA_OMC="$OMEGA_OMC" OMEGA_BRIDGE="$OMEGA_BRIDGE" \
86 make -s test-prefill-shape test-prefill-scoped
87
88# Final additive v2 identity and import proof (c0.log):
89bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 \
90 env OMEGA_OMC="$OMEGA_OMC" sh compat/cuda/test.sh /tmp/standalone-c0-v2-proof
91```
92
93| Command / log | rc | Observed final line or result |
94|---|---:|---|
95| `om/units.sh` | 0 | wrote checked portable Omega units to the lane `src` directory |
96| `compat/cuda/build.sh` | 0 | `built ptx 3f104fbfb9f2a98c633b9fab39cf1f67caae009d3785f42238b1c5ae32739971` |
97| focused targets / `focused.log` | 0 | `PASS standalone family: eight host checks, identical before/after verdicts, eight red controls` |
98| original-source comparison / `family.log` | 0 | same eight-check family PASS line |
99| prefill host/sim / `prefill.log` | 0 | `wrong_tile_height: caught` |
100| fixture admission / `c0.log` | 0 | `CUDA-C0-PROFILE-TEST PASS` |
101
102`prefill.log` was collected before the final checker-only policy/absolute-error
103refinements; production prefill code was unchanged. Final `focused.log` and
104`family.log` re-exercise the affected checkers after those refinements, including
105scoped isolation and its source mutants. Focused targets also exercise q38 bounds,
1061309 envelope cases and envelope mutants, descriptor/layout refusals and budget
107admission. The `bad row...` diagnostics in `family.log` are intentional existing
108negative controls and match the original source byte-for-byte.
109
110## Before / after and a red control for every checker
111
112`family.log` compiles the actual original files from the base Git revision, the
113Omega-default current files and the current default-OFF C snapshot. It asserts
114both stdout and stderr are byte-identical. All normal variants return 0.
115`focused.log` separately labels its available baseline `C-snapshot`; it does not
116claim that snapshot is the original Git source.
117
118| Checker | Identical original/default/C-snapshot observed result | Red rc / cause |
119|---|---|---|
120| `compat/cuda/fixture/vadd_drv.c` | `VADD_U32 PASS n=4099 grid=17 block=256 checksum=8806203976955` | 1, poisoned CPU transport result |
121| `tools/interop/cubin_probe.c` | M=17 K=7 N=19, `worst_abs=0 bad=0 untouched=0` | 5, poisoned CPU transport result |
122| `om/attention-mirror/dispatch-check.c` | actual adapter scoped order/reuse/bypass/isolation/geometry/operation failures PASS | -6, corrupted Omega equality result |
123| `om/prefill-shape/cache-check.c` | `prefill cache admission: PASS` | 1, corrupted paired equality |
124| `om/prefill-shape/scoped-check.c` | `scoped qgemm isolation: PASS` | 1, corrupted Omega equality result |
125| `om/q38-head/budget-check.c` | exact-head reserve/null-handle refusal PASS | -6, corrupted Omega equality result |
126| `om/q38-head/check.c` | bounds/slack/tails/orders/repetitions PASS; existing arithmetic and infinite-radius mutants caught | 1, corrupted Omega conjunction |
127| `om/q38-head/norm-check.c` | `RMSNorm envelope: 90 cases, 0 failures, largest norm 71.5541835982, bound 100: PASS` | 1, poisoned CPU simulator transport result |
128
129Negative return -6 is Python's observed signal return for SIGABRT, not a claimed
130process exit code. Core dumps are disabled by the runner. A separate missing-unit
131link control fails with an undefined `omega_so_oracles` symbol.
132
133`host-cuda.c` is a verification-only CPU CUDA transport: it never loads a GPU
134module. Its independent CPU vector-add/matmul supplies transport results, while
135the changed probe's reference calculation uses Omega. `host-norm.c` captures real
136emitted norm IR and executes it in WsSim. Its invocation uses the existing
137`--chip` CLI to reach that checker path, but all GPU/session/allocation/launch
138transports are wrapped and devices hidden. This is simulator evidence, **not chip
139evidence**. `HOST-STUB-NOT-A-GPU-WINDOW` is a deliberately synthetic transport
140marker, not an authorization token. The vadd fixture was never run on a GPU.
141
142## Partitions and Omega source mutation controls
143
144The scalar C/Omega differential reports **1270080 cases**, including source-derived
145v-1/v/v+1 boundaries, 0/UINT32_MAX/UINT64_MAX, tile/dispatch/cache/reading/budget
146boundaries, fixture moduli and sparse-tail indices. Float inputs include signed
147zero, subnormals, ordinary finite values, infinities and NaNs (NaNs compared by
148class). Tolerance neighbors are tested in f32 and f64. Checked Omega narrowing is
149preceded by explicit unsigned masks to preserve C wrapping; absolute error clears
150the binary64 sign bit, including negative zero.
151
152Every mutant below modifies `.om`, is recompiled through the pinned seeded bridge,
153and is killed by the scalar differential. A compiler rejection does not count as
154a killed mutant. Final results are recorded in `focused.log`.
155
156| Mutant | Changed policy | Observed killing input |
157|---|---|---|
158| vadd_multiplier | reference multiplier off by one | op=0 a=1 |
159| grid_round_down | omit launch-grid round-up | op=7 a=1 |
160| mirror_threshold | move mirror size boundary | op=10 a=2 b=0x400 |
161| cache_admit_extra | admit an extra cache case | op=13 a=2 |
162| reading_boundary | exclude the reading boundary | op=15 a=0x40 |
163| budget_short | reserve one byte less | op=17 a=0 |
164| accept_infinity | classify infinity as finite | op=24 a=0x7f800000 |
165| rng_multiplier | change reference RNG recurrence | op=22 a=1 |
166| norm_sparse_tail | omit last sparse coefficient | op=27 a=0x13ff b=1 |
167
168The relocated dispatch mutant compiler also needed the original checker include
169path after the new helper include; this was fixed rather than suppressing those
170existing controls. The final focused gate kills all four existing dispatch
171mutants and all three existing scoped mutants.
172
173## Frozen v1 identities and additive v2 fixture identity
174
175This is a **fixture identity change**, not a mutation of a pinned v1 profile.
176`profile-c0-aarch64-v1.tsv` and `profile-c0-x86_64-v1.tsv` remain byte-identical to
177the base revision; `identities.log` records the comparison and their SHA-256:
178
179- aarch64 v1: `fba4fd4f91e93dd9543038998494b2a5263e042f8394e373647b2321a7278fe8`.
180- x86_64 v1: `28d405fe1ffe05cf08125a2f110df1948fbba7acfade814c7bb8733036d13a11`.
181
182The build and test entry points select the new v2 profiles. `c0.log` records two
183identical rebuilds, successful static admission on both ISAs, and an **empty diff
184of CUDA imported symbols between v1 and v2** for each ISA. New non-CUDA trap
185runtime imports are explicitly listed, not silently ignored. The x86_64 result
186is static-only; no x86_64 device execution is claimed. All 14 existing profile
187refusal controls reject.
188
189Final v2 host executable SHA-256:
190
191- aarch64: `c2e71d889a01f0ab63c1252ea2b62182b9e994c2d4c028056309745caebbf0e5`.
192- x86_64: `89e471cd1198e9688ad080cdd7f43aa897fe36f426283ec4036f99556c7231cb`.
193- PTX identity is unchanged:
194 `3f104fbfb9f2a98c633b9fab39cf1f67caae009d3785f42238b1c5ae32739971`.
195
196## Wolfram calculation record
197
198WolframLanguageEvaluator queries used for newly written constants/partitions:
199
200```text
201{2^31,2^32-1,2^32,2^30*2,FromDigits["A5A5A5A5",16],2^23,2^24,Ceiling[4099/256],5120*4,5120*8}
202-> {2147483648,4294967295,4294967296,2147483648,2779096485,8388608,16777216,17,20480,40960}
203
204{Ceiling[1024/2],24*1024,Ceiling[1024/2]*24*1024}
205-> {512,24576,12582912} (scratch bytes in the last result)
206
207{2^63-1,IntegerString[2^63-1,16]}
208-> {9223372036854775807,"7fffffffffffffff"}
209
210Table[With[{p=pair[[1]],bias=pair[[2]],e=Last[MantissaExponent[1/10000,2]]-1},
211 With[{u=(e+bias) 2^(p-1)+Round[(1/10000) 2^(p-1-e)]-2^(p-1)},
212 IntegerString[{u-1,u,u+1},16]]],{pair,{{24,127},{53,1023}}}]
213-> {{"38d1b716","38d1b717","38d1b718"},
214 {"3f1a36e2eb1c432c","3f1a36e2eb1c432d","3f1a36e2eb1c432e"}}
215```
216
217These are calculated encoding/boundary values, not measured device performance.
218Numeric checker output above is quoted from the measured host logs.
219
220## Chip runbook — NOT_RUN
221
222No chip command is authorized by this receipt. The parent/integrator owns any
223future hardware qualification. Before a future run, obtain the current explicit
224exclusive-window authorization, inspect current gate/claim/service ownership,
225verify the source/compiler pins and follow the applicable CUDApp hardware runbook.
226Do not infer availability from an unlocked file or this historical host receipt.
227Do not touch live services, driver bindings, VFIO, modules or GPU locks here.
228
229Within a separately authorized hardware task, the existing q38 runbook/runner
230provides physical bounds and norm entry paths; a real norm invocation requires
231real operator-selected weights/envelope inputs, and a real interop probe requires
232a qualified cubin and function/dimensions. Record exact approved inputs, observed
233outputs, device/session identities and negative controls in a new hardware receipt.
234Keep the pure host dispatch/cache/scoped/budget/scalar checks device-hidden.
235Do **not** execute the libcuda-compat vadd fixture on a GPU as part of this lane.
236No host transport result may be relabeled QUALIFIED. Until that separate task,
237chip/live-RM/VFIO/hardware remain NOT_RUN.
238
239## Integration notes
240
241The lane changes no compiler syntax, compiler pin, encoder, bridge contract,
242public API, repository ownership or qualification gate. The new private unit and
243focused commands are documented in `om/standalone-oracles/README.md`; active C0
244fixture identities are documented in `compat/cuda/README.md`. ROADMAP receives
245one dated note and no status-row upgrade. No omega-harness skill contract changes.
246Full-repository integration/CI remains the parent integrator's responsibility.