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/2026-11-06-codegen-base/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 / 2026-11-06-codegen-base / README.md` 120 lines · 8683 bytes Raw Blame History Rendered 1 # Codegen base/common replay — host evidence, 2026-11-06 2 3 **IMPLEMENTED and EXERCISED on host. Not chip-qualified, merged or deployed.** 4 Baseline CUDApp #309: ``63d18a2cc92cb05f800d17e46b35f0cd6237b3b0``. 5 Registration commit: ``79de6f9`` (before caller cutover). 6 Compiler omega-mv ``e5b32567``, omc SHA-256 7 ``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``. 8 No compiler or bridge profile was repinned. 9 10 ## Exact exercised commands 11 12 Environment for every command: 13 14 ```sh 15 export OMEGA_OMC=$HOME/work/cudastack/omega-mv/seed/out/omc 16 export OMEGA_BRIDGE=$HOME/work/cudastack/omega-bridge 17 export OMEGA_BRIDGE_DIR=$OMEGA_BRIDGE 18 ``` 19 20 | Command | rc | Observed final line / evidence | 21 |---|---|---| 22 | `sh om/units.sh` | 0 | `wrote checked portable Omega units to .../src` (registration and signed-sentinel regeneration) | 23 | `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 make -j3 test-codegen-base-om-mutants` | 0 | `CODEGEN BASE HOST ACCEPTANCE PASS`; final run is `coverage-host.log` | 24 | `bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 make -j1 test-regalloc-om test-om-encoder test-codegen-freestanding` | 0 | `PASS: freestanding codegen contract (14 fixtures, 0 failing checks)`; `existing-targets.log` | 25 26 `sh om/units.sh --check` runs inside both host targets and reports 27 `PASS portable Omega units regenerate byte for byte`. All simulator and 28 mutant subprocesses inherit the same device-hidden namespace. No full 29 `make test` was run; that belongs to the integration owner. 30 31 Final dedicated differential (`coverage-host.log`): 32 33 - `CODEGEN BASE PASS: 413 replay partitions; 206 byte-identical SASS/cubin images; wire bits and budget boundaries`. 34 - Three paths agree: new Omega base + Omega encoder; original C base wire 35 computation + Omega encoder; original C encoder. The whole padded SASS 36 images and cubin containers compare byte for byte. Public single-insn 37 word decoding also agrees for every identity-map vreg entry. 38 - `PASS: one flipped SASS bit rejected by byte comparison`. 39 - Five independently generated seeded-source mutants are killed: 40 `cg_fields`, `cg_replay`, `cg_life`, `cg_invar`, `cg_budget` (each process rc -6). 41 - `CODEGEN BASE MUTANTS PASS: 5 killed`. 42 - Real mathlibs common-build/data entry points also compare against the 43 retained C path over emitter kinds, shape admission, empty/full capacities 44 and thread/budget boundaries. Diagnostic strings agree. 45 46 Existing target results (`existing-targets.log`, one successful make invocation): 47 48 - `test-regalloc-om`: register/matmul policy cases=10000; allocator differential 49 cases=181614, refused=179089, encoded=2525, record-flip caught; signed-GE 50 host-reference cases=98; matmul warp-sim cases=15 CPU oracle bit-identical; 51 hazard decode cases=431078; hazard check cases=40495; bind cases=50686. 52 Target's last verdict: `PASS bind differential cases=50686 refused=38401`. 53 - `test-om-encoder`: hosted golden fixtures pass; `.om and C byte-identical on 54 145 golden instructions and 14 fixture programs`; last line: 55 `red check: one flipped bit aborts the encoder diff, as it must`. 56 - `test-codegen-freestanding`: 14 fixtures, 24448 code bytes agree; malloc 57 allowlist control is refused; the existing exhaustive bf16 sweep agrees on 58 all 2^32 input patterns. Final line is in the command table above. The 59 freestanding side is the inherited C migration oracle, not an Omega 60 freestanding cutover. 61 62 Earlier incremental snapshots (`host.log`, `host-expanded.log`, 63 `final-host.log`) are retained as such, not substituted for final evidence. 64 `host-expanded.log` includes a stale gcov checksum warning from adding 65 partitions. The runner now clears only its own generated build profiles 66 before compilation; the final run has no such warning. During implementation, 67 the undefined-live sentinel case first exposed a checked unsigned-to-signed 68 cast trap. Explicit signed reinterpretation in `cg_life.om` and `cg_invar.om` 69 resolved it; the negative sentinel and signed closure cases are in the final 70 partition. No refusal was converted to a C fallback. 71 72 ## Source coverage and gap disposition 73 74 `oracle-ir.gcov` and `oracle-base.gcov` are final gcov annotated C-oracle 75 sources. Their home paths are normalized to `~`; command logs are unmodified 76 runner output. `gcov-ir.log` reports lines executed 98.48% of 132, branches 77 executed 100.00% of 172, taken at least once 90.12% of 172, calls executed 78 100.00% of 24. These are gcov measurements, not chip results or claims of 79 full branch-direction coverage. 80 81 All uncovered migrated decision directions have one of these dispositions: 82 83 | Original C location | Disposition | 84 |---|---| 85 | `field`, `loop_invariant_ok`, `extend_loop` | Every branch direction exercised in final replay partitions: all register fields, each post-loop source position, definitions outside/inside/after closure, uniform/nonuniform redefinition, extension vs pre-loop/at-closure/after-closure last use. | 86 | replay emitter status/result | All status/result directions exercised by the supplied emitter. Optional null `emit_err` and null unit/program guards are ABI shell paths, not moved computation; dedicated partition uses nonnull diagnostic storage. | 87 | replay `omega_ra_live` bridge-error branches | The unchanged pinned checked binding has fixed valid view/scalar arguments; malformed hints produce the separately covered semantic refusal, not a bridge trap. Artificially corrupting its runtime is not the migration oracle. | 88 | replay setter rejection after metadata admission | Unreachable without breaking the already-ported setter: metadata has already admitted the same GPR-limit interval and program is nonnull. Both metadata bound directions are covered. | 89 | replay append refusal after admission | Unreachable without breaking the already-ported append: nonnull instruction/program and admitted count fit its fixed capacity. Count/operand failures and allocation refusals are separately covered. | 90 | build declaration floor's non-floor direction; peak-overlimit; invalid declaration | Real emitter builds do not produce these states: allocator enforces the peak bound and `omega_bw_gpr_declared` produces an aligned sufficient declaration. `budgets()` separately supplies the source-derived peak/thread cross product, including those floor/peak/refusal boundaries, 0 and UINT32_MAX, directly to the new unit and original source formula. Both CTA-budget directions are covered through the actual common build. | 91 | `call_unit` bridge/other-emitter-error branches | Unchanged status-dispatch shell; the mathlibs data corpus yields success/refused, while the injected common replay emitter exercises bridge/error dispatch. No argument validation was moved out of this helper. | 92 | build null-pointer guards | Unchanged ABI safety shell; zero-thread and code-capacity refusals are exercised. | 93 | base `bw_om_encode` oversize/checked-binding error | Count rejection is reached before encoding through public admission/capacity policy; checked-view arguments in this shell have fixed correct extents. Old/new field packing, word decoding and all successful loop directions are exercised independently. | 94 | base pointer, optional file-dump and allocation error branches | ARCH-0042 shell, not migrated computation. File capture is intentionally off: no cubin/SASS dump is committed. | 95 | base untouched fixture verifiers and prior #309 matmul/allocator functions | Not newly migrated. Their existing dedicated tests pass in `existing-targets.log`; this lane does not relabel uninstrumented runs as source coverage. | 96 97 The whole-file base gcov percentage includes untouched fixture/oracle and 98 allocation/file branches; it is not used as a migration pass percentage. 99 The exact function classification and source-derived partition are in 100 `tests/codegen_base/README.md` and the PR body. 101 102 ## Tier verdicts 103 104 | Tier | Verdict | 105 |---|---| 106 | Seeded unit regeneration/check | PASS | 107 | Common replay / fields / budget differential | PASS | 108 | Whole SASS + cubin byte equality, one-bit red | PASS | 109 | Five seeded-source mutants | PASS | 110 | Existing hosted codegen/allocator targets | PASS | 111 | Existing matmul CPU warp simulator | PASS | 112 | Existing freestanding compatibility/C oracle | PASS | 113 | Full integration suite | NOT_RUN by this lane; integration owner runs it | 114 | GB10 chip / live RM / VFIO | NOT_RUN; no current authorization | 115 | Merge / deployment | NOT_RUN; draft PR only | 116 117 Hardware procedure: `tests/codegen_base/CHIP.md`. 118 The retained C call sites and baseline freestanding limitation are explicitly 119 listed in `tests/codegen_base/README.md`; no claim that every CUDApp C residue 120 has disappeared is made by this lane.