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/numeric-rest-20261106/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 / numeric-rest-20261106 / README.md` 207 lines · 11511 bytes Raw Blame History Rendered 1 # Numeric remainder: seeded Omega default 2 3 Date: 2026-11-06. Scope: census lane 1 NUMERIC_REST. This is stacked on 4 CUDApp #288, `feat/numeric-om`, base 5 ``1b78bfe99aba346e68274e4922f60791456295ab``. The scalar wrappers from that 6 base remain in place. No public signature changed. 7 8 IMPLEMENTED: the remainder defaults to seeded Omega. EXERCISED: host and 9 warp simulator, as recorded below. QUALIFIED on GB10: NOT_RUN. MERGED: 10 NOT_RUN. DEPLOYED: NOT_RUN. No GPU window or live-service change was used. 11 12 ## Source and dependency pins 13 14 `om/units.sh` validates the composed Omega source before converting it and 15 records its source/generated-C hashes in `src/cudapp_om_numeric*.ident`. 16 Registration was committed first, in ``ceb00a1b6617``. 17 18 - Seeded compiler: omega-mv ``e5b32567``, SHA-256 19 ``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``. 20 - Existing bridge converter SHA-256: 21 ``69d629df170a24ba0c2cb6d41dbfaed520e248e0d723236dd32abf0581524d84``. 22 - Existing seeded frontend SHA-256: 23 ``23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37``. 24 25 These are the base branch's pins, not a second toolchain. The pinned compiler 26 and bridge remain verification/build dependencies; the production units are 27 checked generated C from first-party `.om`. No host math implementation was 28 substituted for the new Omega source. Existing scalar math units are reused. 29 30 ## Cutover and retained shells 31 32 | Omega source | Migrated behavior | 33 | --- | --- | 34 | `om/numeric/rest.om` | IEEE predicates, predicate masks, element/reference/CPU dispatch, FTZ, launch/bulk/reduction admission, source-lane mapping, identities/padding/MEAN finish | 35 | `om/numeric/patch.om` | Patch lengths and all instruction words | 36 | `om/numeric/check.om` | Structural producer/register/barrier/tail/QMD and E1 obligations | 37 | `om/numeric/trace.om` | Parity and seed admission, finite-normal domains, comparison and trace accumulation | 38 | `om/numeric/reduce.om` | Frozen tree tile reduction and deliberately distinct sequential left fold | 39 40 The five remainder units are strong dependencies. C adapters marshal ABI 41 scalars/views and float bits, allocate/free hierarchy buffers, transfer 42 rows/tiles, query the existing FP environment/CPU feature effect sites, and 43 render diagnostic strings. Patch annotations and the operation registry are 44 static descriptive data. Diagnostics preserve refusal categories, not their 45 previous exact prose. No weak-symbol or missing-unit fallback exists. 46 47 Old computational bodies compile only with 48 `CUDAPP_MIGRATION_PENDING_C_NUMERIC_REST` or the explicit differential flag 49 `CUDAPP_MIGRATION_PENDING_C_NUMERIC_REST_DIFF`. The latter retains independent 50 C IEEE predicates in oracle translation units; the driver deliberately uses 51 the default Omega-backed public inlines. `CUDAPP_NUMERIC=c` opts into both 52 the preserved scalar C oracle and this remainder oracle. No default flag is 53 changed to C. 54 55 AArch64 BF16 CPU-tier admission still consults the existing capability effect 56 site only when Omega requests it, and preserves the unavailable-feature 57 refusal and empty-input behavior. Unused third operands are not read; a 58 non-dereferenceable unused `c` pointer is an explicit negative control. 59 60 ## Partitions and comparison contract 61 62 `tests/numeric_rest_om_diff_test.c` derives cases from the source decisions: 63 64 - All 42 numeric operations and all four reduction operations. 65 - Counts 0/1, 31/32/33, 63/64/65, 1023/1024/1025; launch counts 66 65535/65536/65537 and UINT32_MAX. MEAN admission checks its maximum and 67 both neighbors without allocating a huge input. SIZE_MAX and row-extent 68 overflow refusals are separate cases. 69 - Both signs of zero, smallest/largest subnormal, smallest normal, finite 70 neighbors around one, finite extrema, infinities, quiet/signaling NaNs, 71 integer exactness/conversion boundaries and narrowing boundaries. Each 72 source pattern is rotated through the operands. 73 - Missing-buffer combinations, invalid op/name, refused variants, empty 74 rows, short row stride, the FP-environment refusal, BF16 feature refusal, 75 and uniform versus varying FFMA constants. 76 - Every patch word and provenance key; every bit of each patch word and 77 every bit of all 96 QMD words is toggled independently and checked against 78 the old structural oracle. 79 - All parity/seed trace fields, checked-lane masks, CPU/reference/FTZ outputs, 80 row reference and CPU results, identities, every hierarchy level and the 81 non-contract sequential fold. 82 83 Non-NaN floating results must match by bits. NaNs compare by class. F16/BF16 84 parity preserves the original class rules. There is no tolerance relaxation 85 for finite reduction outputs, no reordered accumulation, and no implicit 86 FMA contraction (`-ffp-contract=off`). 87 88 WolframLanguageEvaluator: 89 `Table[{i,(1+i 2^-23)-1,Abs[(1+i 2^-23)-1]<=2^-20},{i,{7,8,9}}]` 90 returned `{{7,7/`8388608`,True},{8,1/`1048576`,True},{9,9/`8388608`,False}}`. 91 The driver checks those seed-bound neighbors against both implementations. 92 93 The frozen tree has an explicit red control. WolframLanguageEvaluator: 94 `f[z_]:=First[Normal[NumericArray[{z},"Real32"]]]; v=Join[{`16777216`,1,-`16777216`},ConstantArray[0,29]]; seq=Fold[f[#1+#2]&,0,v]; Do[v=Table[If[i+d<=32,f[v[[i]]+v[[i+d]]],v[[i]]],{i,32}],{d,{16,8,4,2,1}}]; {seq,First[v]}` 95 returned `{0.,1.}`. The runtime must produce the tree's `0x3f800000`, while 96 its explicitly named sequential non-contract path produces positive zero. 97 This demonstrates that a left-fold substitution is not equivalent. 98 99 ## Reproduction envelope 100 101 Every host test, mutant, differential, simulator and coverage run used: 102 103 ``` 104 bwrap --dev-bind / / --dev /dev --proc /proc -- \ 105 taskset -c 10-14 nice -n 10 COMMAND 106 ``` 107 108 Build parallelism was at most `-j3`. Set: 109 110 ``` 111 OMEGA_OMC=~/work/cudastack/omega-mv/seed/out/omc 112 OMEGA_BRIDGE=~/work/cudastack/omega-bridge 113 ``` 114 115 The command logs are captured combined stdout/stderr. The lane's home 116 prefix in the top-level captured logs is normalized to `~`; execution used 117 absolute expanded paths. Mutation diagnostics retain their temporary paths. 118 119 | Command inside envelope | rc | Observed result / log | 120 | --- | --- | --- | 121 | `sh om/units.sh` | 0 | checked portable units written; [generation.log](generation.log) | 122 | `make -j3 test-numeric-rest-om-diff` | 0 | `NUMERIC REST OM DIFF PASS`, `checks=`8418438``; [remainder-diff.log](remainder-diff.log) | 123 | `make -j3 test-numeric-om-diff` | 0 | `NUMERIC OM DIFF PASS `152415164``; [scalar-diff.log](scalar-diff.log) | 124 | `make -j3 test-ampere-numeric-host test-ampere-f16-host` | 0 | numeric host PASS; F16 boundary/native/negative controls PASS; [numeric-host.log](numeric-host.log) | 125 | `make -j3 test-gpu-scan` | 0 | C3 scan simulator PASS, 139 checks, both scheduling orders; [scan-sim.log](scan-sim.log) | 126 | `build/gpu_scan_test --host-only` | 0 | C3 scan host PASS, 133 checks; [scan-host.log](scan-host.log) | 127 | `make -j3 test-numeric-om-mutants` | 0 | preserved scalar mutants PASS 6/6; [scalar-mutants.log](scalar-mutants.log) | 128 | `make -j3 test-numeric-rest-om-mutants` | 0 | remainder mutants PASS 6/6; [remainder-mutants.log](remainder-mutants.log) | 129 | `make -j3 AMPERE_CUBIN_DIR=build/numeric-rest-c-oracle CUDAPP_NUMERIC=c test-ampere-numeric-host` | 0 | independent opt-in C host tier; [c-oracle-host.log](c-oracle-host.log) | 130 | `sh tools/numeric_rest_om_coverage.sh /tmp/integ/numeric-rest-coverage-final-`20261106`` | 0 | `-O0 --coverage` oracle entry/branch report; [coverage.log](coverage.log) | 131 132 ## Negative controls and killed Omega mutants 133 134 The disposable mutant runner first requires a green regenerated control. 135 It then removes each remainder generated unit in turn: rest, patch, check, 136 trace and reduce. All five must fail to link with the corresponding undefined 137 strong Omega entry, not silently take a C path. Diagnostics are in `mutants/`. 138 139 | Mutant | Changed source decision | Required rejection | 140 | --- | --- | --- | 141 | `source_lane` | LDS XOR lane 63 to 62 | reference result bits differ | 142 | `ftz_dropped` | remove FTZ input/output handling | FTZ result bits differ | 143 | `parity_compare` | reverse the equality branch | trace differs | 144 | `minmax_padding` | remove MIN/MAX identity admission | identity differs | 145 | `patch_exit` | change EXIT opcode word | patch words differ | 146 | `seed_bound` | replace bound denominator | seed trace differs | 147 148 All six are changed `.om` sources, regenerated through the pinned converter, 149 not hand-edited generated C. Compilation failure is not counted as a kill: 150 the mutated differential binary must run and report `FAIL`. 151 Every killed binary exited `1`; the control exited `0`. The exact first 152 failure and per-unit link diagnostics are preserved in the logs. 153 154 ## Coverage interpretation 155 156 The coverage runner compiles the old C oracle and default adapters together 157 at `-O0 --coverage`. `coverage.log` records each function's line coverage and 158 each file's executed/taken branch counts. Coverage is evidence of exercised 159 entries and branches, not a proof that every possible floating input was 160 enumerated. Native x86-only branches were not exercised on this AArch64 host; 161 allocation failure is not injected. The preserved scalar gate supplies its 162 separate scalar differential coverage. Metadata/effect-only helpers outside 163 the census remainder are not claimed fully covered. 164 165 The measured file summaries are: 166 167 | Source | Lines executed | Branches executed | Branches taken at least once | 168 | --- | --- | --- | --- | 169 | `omega_numeric.c` | 93.88% | 96.22% | 85.16% | 170 | `omega_numeric_reduce.c` | 95.00% | 98.41% | 76.98% | 171 | `omega_numeric_rest.inc` | 100.00% | 98.46% | 81.54% | 172 | `omega_numeric_reduce_rest.inc` | 100.00% | 100.00% | 86.67% | 173 174 All listed remainder oracle entries were exercised. The log separately 175 reports incomplete lines for native CPU realization, bulk default/error 176 branches, patch defaults and launch refusal paths; it does not silently 177 classify them as covered. Native chip execution is not part of this report. 178 179 ## GB10 runbook: NOT_RUN 180 181 Do not execute this runbook without a fresh, explicitly authorized exclusive 182 GPU window using the current operator procedure. A free-looking lock or a 183 historical receipt is not authorization. This lane did not acquire or modify 184 the chip lock, services, GPU modules, VFIO binding or live model. 185 186 After the operator authorizes the window and safely handles any live serving 187 work under that procedure: 188 189 1. Record the exact integrated head, compiler/bridge identity and passive 190 device state. Re-run the focused device-hidden host/simulator commands 191 above on that head. 192 2. Build `build/gpu_scan_test` with `make -j3 build/gpu_scan_test` in the 193 device-hidden build envelope. Inspect its source's unchanged runtime 194 limits before the chip run. 195 3. Under the authorized operator GPU wrapper, run `build/gpu_scan_test` with 196 no tier flag. Its existing chip tier checks every n from 1 through 2048, 197 power-of-two neighbors through the default maximum, random lengths and 198 the existing three scan mutants. Do not substitute `--sim` or reduce the 199 maximum and call that full chip qualification. 200 4. Save command, rc, exact final line, chip identity, raw comparisons and 201 negative-control results in a new immutable receipt. Stop on any failed 202 control or mismatch. Restore/release the window only through the current 203 operator procedure. 204 205 Until that procedure is actually executed, chip/live-RM/VFIO/HW results remain 206 NOT_RUN. Full `make test` belongs to the integrator and was not run by this 207 lane. No merge or deployment is implied by these host results.