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 / 2026-11-06-no-posix / README.md

191 lines · 12122 bytes Raw Blame History Rendered
1<!-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->
2# NO_POSIX native cutover receipt (2026-11-06)
3
4## Scope and custody
5
6IMPLEMENTED and host EXERCISED. Chip QUALIFIED: NOT_RUN. MERGED: NOT_RUN.
7DEPLOYED: NOT_RUN. No device was opened and no live service or GPU lock was touched.
8This is a freestanding computation/binding qualification, not device qualification.
9
10Base: `eceb8c542fa6` (CUDApp #330). First registration commit: `56c0fea`.
11The complete base-revision macro inventory is [tests/NO_POSIX.md](../../tests/NO_POSIX.md).
12Only the explicit encoder, ELF writer and bf16 C fallback computations are cut over.
13Session command-list computation, fragment packers/sentinels and #327's base
14functions remain outside this lane. Their migration status is not claimed here.
15
16The encoder and ELF writer use the same pre-existing `.om` sources as hosted
17portable builds, prefixed with `om2`, and compiled by the seeded compiler.
18The new `om/numeric/no_bf16.om` implements the integer rounding path.
19`om/units.sh --native-no-posix` builds all three through `tools/native --freestanding`.
20`CUDAPP_MIGRATION_PENDING_C_NO_POSIX` is default OFF and selects the C primary
21oracles. Existing hosted per-unit differential macros remain default OFF.
22No public ABI, compiler syntax, gate policy or host word changes were made.
23The matching build/registration guide is `tests/NO_POSIX.md`; no omega-harness
24language/compiler guide or compiler pin changes are required by this cutover.
25
26Final native bridge: combined #76, `741c1ebb2b0fbae311a77ad2118b13d5ec7a17ee`,
27selected by Main through Integrator4. Earlier #75 receipts are retained as
28historical attempts, not as final stage-5 custody. Registry pins:
29
30- `tools/native`: `14b2b51ed062ebaa7ea99e83752cc075452465b9ddba4939eb171692358ecb6b`
31- `src/native.om`: `e2077722aaeffb1121b70160e22357ea47f369e0039ab1ea06dc700f6f4e45d7`
32- Unit compiler: omega-mv `e5b32567`, SHA-256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`
33- Generator bootstrap compiler required by the bridge: SHA-256 `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`
34- GCC: Ubuntu `13.3.0-6ubuntu2~24.04.1`, version `13.3.0`
35
36The two compilers have distinct jobs: `OMEGA_NATIVE_OMC` bootstraps the bridge
37generator; `OMEGA_NATIVE_OMC2` is forced to the assigned `OMEGA_OMC` for all
38computation units. Generated C is bounded ABI/memory binding, not handwritten
39computation. Existing scalar f16 already uses its import-free seeded binding.
40
41## Commands and observed results
42
43Native environment used:
44
45```sh
46export OMEGA_NATIVE_OMC=/tmp/no-posix-baseline-omc
47export OMEGA_OMC=$HOME/work/cudastack/omega-mv/seed/out/omc
48export OMEGA_BRIDGE=/tmp/bridge-pin-merge
49```
50
51Every test, red control, mutant and child test binary was inside:
52
53```sh
54bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 COMMAND
55```
56
57| Command (inside wrapper) | RC | Observed result | Receipt |
58|---|---|---|---|
59| `make -j3 gpu-engine-freestanding test-gpu-engine-freestanding test-codegen-freestanding` | 0 | Engine 50/0; platform 7/0; malloc canary refused; 14 fixture dumps, 24448 code bytes identical; exhaustive bf16 sweep passed; final `PASS: freestanding codegen contract (14 fixtures, 0 failing checks)` | `required-final.log` |
60| `make -j3 test-no-posix-native` | 0 | Import-free static ELF; same hosted/native result bytes; red exit 90; six source mutants killed; C encoder dump and goldens equal native; cubin image/refusal differential passed | `target-final-native.log` records every child command/RC |
61| `make -j3 test-no-posix-native test-gpu-native-runtime` | 0 | Focused native gate passed; runtime consumer reported `test_omega_gpu_session_platform: 27 passed, 0 failed`, explicitly HOST_ONLY/synthetic | supplementary consumer run, same device-free wrapper |
62| `sh om/units.sh --check` with portable bridge checkout `~/work/cudastack/omega-bridge` matching `om/omega-bridge.lock` | 0 | `PASS portable Omega units regenerate byte for byte` | `units.log`; rerun after dispatcher addition with same result |
63| `make -j3 build/no_posix/native/omega_api_defs.o` after removing only that generated object | 0 | Regenerated both native objects; grouped-output rule recovers partial output | `rebuild.log` (initial native composition) |
64
65The partial link retains exactly the existing allowed undefined symbols:
66`memcmp memcpy memset strcmp strlen`. Its malloc canary is refused.
67The new static bare AArch64 ELF has **no undefined symbols**, no interpreter,
68no `.tdata` and no `.tbss`. No new libc dependency is admitted.
69
70The cubin positive sweep reports 854 calls, 740 images, 111037984 image bytes;
71ARG/TEXT/PARAMS/CBANK/GPR/SHARED refusal classes are all reached. Its separate
72explicit-target fixture covers sm_86 and sm_121 successes plus target
73`0,85,87,120,122,UINT32_MAX` refusals and a null parameter-array refusal.
74The C-vs-Omega differential compares complete images and diagnostic strings,
75not a checksum approximation. A flipped image byte aborts with signal 6.
76
77The bare fixture covers encoder empty/padded output, no-padding output,
78invalid opcode, short-view status and untouched result sentinel; native bf16
79covers zero, negative zero, exact values, both tie parities, infinity and NaNs.
80The required codegen gate additionally compares **every f32 bit pattern** to
81the hosted `__bf16` cast. The source's quiet-NaN payload convention is preserved.
82
83Killed `.om` mutants: NOP word (exit 2), NOP control (2), padding floor (1),
84byte-size multiplier (1), NaN quiet bit (7), RNE tie parity (7).
85The generated wrong-result red ELF exits 90 instead of success.
86
87## Coverage and unsuccessful attempts
88
89C oracles ran under bwrap with `--coverage -O0` and `-ffp-contract=off`.
90The final gcov summaries in `target-final-native.log` report:
91
92- `omega_blackwell_codegen.c`: 88.40% lines, 90.84% branches executed,
93 53.86% branches taken at least once; this file includes other lanes' functions.
94- `omega_cubin.c`: 93.85% lines, 96.35% branches executed,
95 78.47% branches taken at least once.
96
97[coverage-exceptions.md](coverage-exceptions.md) enumerates every uncovered
98branch's source-line set with a justification. No full branch-coverage claim
99is made. Allocator exhaustion and corrupted native status/detail shapes are
100not synthesized by adding production hooks.
101
102An initial supplemental oracle invocation used hosted `--golden` on a
103NO_POSIX binary. That binary's existing argument contract instead runs the
104exhaustive bf16 sweep unless passed `--no-sweep`; at `-O0` this timed out.
105That attempt is INCONCLUSIVE, not PASS (`combined-gates.log`, composite RC 2
106after terminating the owned oracle). A second overlapping Eval was interrupted
107by the first Eval's timeout. Only this lane's exact orphan PIDs were stopped.
108The focused harness now uses the existing `--no-sweep` mode for supplementary
109buffer/golden coverage. The required `test-codegen-freestanding` target is
110unchanged and its exhaustive sweep still runs and passes in `required-final.log`.
111All corrected gates were rerun after the process cleanup. No process is retained.
112
113Earlier `gates.log`, `native.log`, `native-final.log` if present, and
114`combined-corrected-native.log` document intermediate compositions/cases.
115`required-final.log` and `target-final-native.log` are the final acceptance
116receipts. Home prefixes in exported textual logs are normalized to `~`; no
117result values are changed. Binary test return records are hex-framed in logs.
118
119## Chip runbook (NOT_RUN)
120
1211. Obtain the current operator-approved exclusive chip window through the
122 existing Spark authorization procedure. A free advisory lock is not authority.
123 Do not stop or alter any live model service under this lane's authority.
1242. Pin the integrated CUDApp head, combined bridge revision and both compiler
125 digests above. Repeat these host gates inside the device-free wrapper first.
126 Preserve the native `work/` identities and generated object digests with the
127 operator's chip receipt; do not commit cubins or NVIDIA binaries.
1283. In the approved hardware harness, link `build/gpu_fs/omega_gpu_freestanding.o`
129 with its real ABI-1.1 `OmegaGpuPlatform`. Require explicit platform/clock
130 installation; never treat the synthetic runtime test as a real platform.
131 Encode the same 14 fixture descriptors through
132 `omega_blackwell_kernel_encode_into` into caller-owned buffers. Compare their
133 bytes and declared-register metadata to the frozen hosted fixture dumps
134 before any submission. Package through the same native `omega2_cubin_elf`
135 unit using platform-owned scratch memory, not the hosted malloc shell.
1364. Launch the admitted canary/matmul fixture through the approved platform's
137 existing launch path. Compare output bits and completion markers to the
138 hosted reference; retain code digest, input/output digests, return status,
139 platform identity and device/window identity in a new chip receipt.
140 The invalid-opcode and invalid-target controls must refuse before submit;
141 mutated output must be rejected before a GPU launch, not executed as SASS.
1425. A host match, successful ELF packing or synthetic session is not hardware
143 success. Missing real platform installation, missing authorization or any
144 skipped launch stays NOT_RUN. This lane performs no hardware launch.
145
146## Remaining C and integration boundary
147
148C remains for native entry/ABI marshalling, buffers, pointer ownership,
149allocation/diagnostic shells and syscall/platform guards from the inventory.
150The inline bulk bf16 helper remains for its existing other callers and the
151explicit C oracle; default freestanding scalar conversion no longer calls it.
152The allocating cubin shell is not an allocator-free firmware API and is not
153part of the GPU partial link. The native unit itself is import-free.
154
155No compiler/bridge extension is required. The new native roots are registered
156through a separate mode because the normal portable registry emits committed
157portable C, whereas native custody emits caller-stack machine-code bindings.
158Shared integration files: `om/units.sh`, `mk/omega-gpu-engine.mk`, encoder and
159cubin selection blocks, matmul conversion and the matching comments/docs.
160SessionCmdlist2 was notified that its mutant harness must include
161`$(GPU_NO_POSIX_OBJS)` alongside `$(GPU_FS_OBJS)`; it confirmed that change.
162Full `make test`, chip, live RM/VFIO, firmware integration and deployment are
163NOT_RUN here; the integrator owns the combined full gate.
164
165## Wolfram queries
166
167- `Integrate[x^2,{x,0,1}] -> 1/3` (evaluator verification).
168- WolframAlpha `sqrt(27)/2 -> (3 sqrt(3))/2` (second tool verification).
169- `FromDigits[#,16]& /@ {"7f800000","007fffff","0040","7fff"}`
170 `-> {2139095040,8388607,64,32767}`.
171- `v=FromDigits[#,16]& /@ {"00000000","80000000","3f800000","3f808000","3f818000","7f800001","ffffffff","7f800000"}; {v,(If[BitAnd[#,2139095040]==2139095040 && BitAnd[#,8388607]!=0,BitOr[BitShiftRight[#,16],64],BitShiftRight[Mod[#+32767+BitAnd[BitShiftRight[#,16],1],2^32],16]]& /@ v)}`
172 `-> {{0,2147483648,1065353216,1065385984,1065451520,2139095041,4294967295,2139095040},{0,32768,16256,16256,16258,32704,65535,32640}}`.
173- `{86+{-1,0,1},121+{-1,0,1},2^32-1}`
174 `-> {{85,86,87},{120,121,122},4294967295}`.
175
176These are reference calculations. Test counts/coverage/byte counts quoted
177above are measured outputs, not modeled hardware performance.
178
179## Addendum: inherited session-mutant consumer
180
181The stacked base's legacy session-mutant link also consumes `GPU_FS_OBJS`.
182It now links `GPU_NO_POSIX_OBJS`, keeping this draft self-contained before the
183session lane's replacement recipe lands. SessionCmdlist2 agreed to this
184one-line shared-file change; its #334 recipe already carries the same objects.
185No session source or mutant semantics changed.
186
187`make -j3 test-gpu-session-mutants` under the same wrapper and combined bridge
188environment returned 0: **11 of 11 mutants killed**. Exact output is recorded
189in [session-mutants.log](session-mutants.log). On integration retain #334's
190replacement `SESSION_FS_OBJECTS='$(GPU_FS_OBJS) $(GPU_NO_POSIX_OBJS)'` recipe
191rather than the superseded base recipe.