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
CUDApp / evidence / 2026-11-06-no-posix / README.md
| 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 | |
| 6 | IMPLEMENTED and host EXERCISED. Chip QUALIFIED: NOT_RUN. MERGED: NOT_RUN. |
| 7 | DEPLOYED: NOT_RUN. No device was opened and no live service or GPU lock was touched. |
| 8 | This is a freestanding computation/binding qualification, not device qualification. |
| 9 | |
| 10 | Base: `eceb8c542fa6` (CUDApp #330). First registration commit: `56c0fea`. |
| 11 | The complete base-revision macro inventory is [tests/NO_POSIX.md](../../tests/NO_POSIX.md). |
| 12 | Only the explicit encoder, ELF writer and bf16 C fallback computations are cut over. |
| 13 | Session command-list computation, fragment packers/sentinels and #327's base |
| 14 | functions remain outside this lane. Their migration status is not claimed here. |
| 15 | |
| 16 | The encoder and ELF writer use the same pre-existing `.om` sources as hosted |
| 17 | portable builds, prefixed with `om2`, and compiled by the seeded compiler. |
| 18 | The 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 |
| 21 | oracles. Existing hosted per-unit differential macros remain default OFF. |
| 22 | No public ABI, compiler syntax, gate policy or host word changes were made. |
| 23 | The matching build/registration guide is `tests/NO_POSIX.md`; no omega-harness |
| 24 | language/compiler guide or compiler pin changes are required by this cutover. |
| 25 | |
| 26 | Final native bridge: combined #76, `741c1ebb2b0fbae311a77ad2118b13d5ec7a17ee`, |
| 27 | selected by Main through Integrator4. Earlier #75 receipts are retained as |
| 28 | historical 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 | |
| 36 | The two compilers have distinct jobs: `OMEGA_NATIVE_OMC` bootstraps the bridge |
| 37 | generator; `OMEGA_NATIVE_OMC2` is forced to the assigned `OMEGA_OMC` for all |
| 38 | computation units. Generated C is bounded ABI/memory binding, not handwritten |
| 39 | computation. Existing scalar f16 already uses its import-free seeded binding. |
| 40 | |
| 41 | ## Commands and observed results |
| 42 | |
| 43 | Native environment used: |
| 44 | |
| 45 | ```sh |
| 46 | export OMEGA_NATIVE_OMC=/tmp/no-posix-baseline-omc |
| 47 | export OMEGA_OMC=$HOME/work/cudastack/omega-mv/seed/out/omc |
| 48 | export OMEGA_BRIDGE=/tmp/bridge-pin-merge |
| 49 | ``` |
| 50 | |
| 51 | Every test, red control, mutant and child test binary was inside: |
| 52 | |
| 53 | ```sh |
| 54 | bwrap --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 | |
| 65 | The partial link retains exactly the existing allowed undefined symbols: |
| 66 | `memcmp memcpy memset strcmp strlen`. Its malloc canary is refused. |
| 67 | The new static bare AArch64 ELF has **no undefined symbols**, no interpreter, |
| 68 | no `.tdata` and no `.tbss`. No new libc dependency is admitted. |
| 69 | |
| 70 | The cubin positive sweep reports 854 calls, 740 images, 111037984 image bytes; |
| 71 | ARG/TEXT/PARAMS/CBANK/GPR/SHARED refusal classes are all reached. Its separate |
| 72 | explicit-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. |
| 74 | The C-vs-Omega differential compares complete images and diagnostic strings, |
| 75 | not a checksum approximation. A flipped image byte aborts with signal 6. |
| 76 | |
| 77 | The bare fixture covers encoder empty/padded output, no-padding output, |
| 78 | invalid opcode, short-view status and untouched result sentinel; native bf16 |
| 79 | covers zero, negative zero, exact values, both tie parities, infinity and NaNs. |
| 80 | The required codegen gate additionally compares **every f32 bit pattern** to |
| 81 | the hosted `__bf16` cast. The source's quiet-NaN payload convention is preserved. |
| 82 | |
| 83 | Killed `.om` mutants: NOP word (exit 2), NOP control (2), padding floor (1), |
| 84 | byte-size multiplier (1), NaN quiet bit (7), RNE tie parity (7). |
| 85 | The generated wrong-result red ELF exits 90 instead of success. |
| 86 | |
| 87 | ## Coverage and unsuccessful attempts |
| 88 | |
| 89 | C oracles ran under bwrap with `--coverage -O0` and `-ffp-contract=off`. |
| 90 | The 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 |
| 98 | branch's source-line set with a justification. No full branch-coverage claim |
| 99 | is made. Allocator exhaustion and corrupted native status/detail shapes are |
| 100 | not synthesized by adding production hooks. |
| 101 | |
| 102 | An initial supplemental oracle invocation used hosted `--golden` on a |
| 103 | NO_POSIX binary. That binary's existing argument contract instead runs the |
| 104 | exhaustive bf16 sweep unless passed `--no-sweep`; at `-O0` this timed out. |
| 105 | That attempt is INCONCLUSIVE, not PASS (`combined-gates.log`, composite RC 2 |
| 106 | after terminating the owned oracle). A second overlapping Eval was interrupted |
| 107 | by the first Eval's timeout. Only this lane's exact orphan PIDs were stopped. |
| 108 | The focused harness now uses the existing `--no-sweep` mode for supplementary |
| 109 | buffer/golden coverage. The required `test-codegen-freestanding` target is |
| 110 | unchanged and its exhaustive sweep still runs and passes in `required-final.log`. |
| 111 | All corrected gates were rerun after the process cleanup. No process is retained. |
| 112 | |
| 113 | Earlier `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 |
| 116 | receipts. Home prefixes in exported textual logs are normalized to `~`; no |
| 117 | result values are changed. Binary test return records are hex-framed in logs. |
| 118 | |
| 119 | ## Chip runbook (NOT_RUN) |
| 120 | |
| 121 | 1. 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. |
| 124 | 2. 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. |
| 128 | 3. 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. |
| 136 | 4. 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. |
| 142 | 5. 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 | |
| 148 | C remains for native entry/ABI marshalling, buffers, pointer ownership, |
| 149 | allocation/diagnostic shells and syscall/platform guards from the inventory. |
| 150 | The inline bulk bf16 helper remains for its existing other callers and the |
| 151 | explicit C oracle; default freestanding scalar conversion no longer calls it. |
| 152 | The allocating cubin shell is not an allocator-free firmware API and is not |
| 153 | part of the GPU partial link. The native unit itself is import-free. |
| 154 | |
| 155 | No compiler/bridge extension is required. The new native roots are registered |
| 156 | through a separate mode because the normal portable registry emits committed |
| 157 | portable C, whereas native custody emits caller-stack machine-code bindings. |
| 158 | Shared integration files: `om/units.sh`, `mk/omega-gpu-engine.mk`, encoder and |
| 159 | cubin selection blocks, matmul conversion and the matching comments/docs. |
| 160 | SessionCmdlist2 was notified that its mutant harness must include |
| 161 | `$(GPU_NO_POSIX_OBJS)` alongside `$(GPU_FS_OBJS)`; it confirmed that change. |
| 162 | Full `make test`, chip, live RM/VFIO, firmware integration and deployment are |
| 163 | NOT_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 | |
| 176 | These are reference calculations. Test counts/coverage/byte counts quoted |
| 177 | above are measured outputs, not modeled hardware performance. |
| 178 | |
| 179 | ## Addendum: inherited session-mutant consumer |
| 180 | |
| 181 | The stacked base's legacy session-mutant link also consumes `GPU_FS_OBJS`. |
| 182 | It now links `GPU_NO_POSIX_OBJS`, keeping this draft self-contained before the |
| 183 | session lane's replacement recipe lands. SessionCmdlist2 agreed to this |
| 184 | one-line shared-file change; its #334 recipe already carries the same objects. |
| 185 | No session source or mutant semantics changed. |
| 186 | |
| 187 | `make -j3 test-gpu-session-mutants` under the same wrapper and combined bridge |
| 188 | environment returned 0: **11 of 11 mutants killed**. Exact output is recorded |
| 189 | in [session-mutants.log](session-mutants.log). On integration retain #334's |
| 190 | replacement `SESSION_FS_OBJECTS='$(GPU_FS_OBJS) $(GPU_NO_POSIX_OBJS)'` recipe |
| 191 | rather than the superseded base recipe. |