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 / engine-fixture-rest-20261106 / README.md
| 1 | # Engine fixture residue and clock scalars — 2026-11-06 |
| 2 | |
| 3 | ## Scope and verdicts |
| 4 | |
| 5 | IMPLEMENTED / EXERCISED on `feat/engine-fixture-rest-om`, based on |
| 6 | `feat/engine-submit-om` at `1ecaf8c40802dee63c9534944fae492005076033` |
| 7 | (PR #321). The four hardware fixture callers are `m16/m16_concurrent.c`, |
| 8 | `m16/m16_requalify.c`, `nvrm/lifecycle_gates.c` and |
| 9 | `nvrm/submission_visibility_gates.c`. Clock conversions are extracted from |
| 10 | `m16/m16_gpu_wait.c`, `m16/m16_native.c`, `src/omega_blackwell_engine.c`, |
| 11 | `src/omega_gpu_wait.c`, `src/omega_blackwell_submit.c` and |
| 12 | `src/omega_gpu_engine.c`. Elementwise's clock is not owned by this lane. |
| 13 | |
| 14 | `om/engine/fixture_rest.om` owns scalar arithmetic/predicates, qualification |
| 15 | result conversion, bounded fixture-text checks, churn sizes/patterns, submission |
| 16 | sizing, flush-tail words and integer-to-f64 reporting scales. The existing |
| 17 | `omega_eng` export remains strong, with private operations 28..30 dispatching |
| 18 | these helpers; `omega_fr_text` is a separate strong bounded-text entry. |
| 19 | C keeps ioctl/mmap, clock_gettime, proc/filesystem reads, effects, iteration and |
| 20 | byte-moving shells. Effectful short-circuit order is preserved. The public API |
| 21 | is unchanged. The default-OFF references are |
| 22 | `CUDAPP_MIGRATION_PENDING_C_ENGINE_FIXTURE_REST` and |
| 23 | `CUDAPP_MIGRATION_PENDING_C_CLOCK_SCALARS`; each flag is also independently |
| 24 | compared against the default Omega transcript. |
| 25 | |
| 26 | | Tier | Verdict | |
| 27 | | --- | --- | |
| 28 | | Host C/Omega differential for every extracted helper | PASS | |
| 29 | | Independent oracle-flag selection | PASS | |
| 30 | | Missing strong entries link control | PASS: missing symbols fail to link | |
| 31 | | Red answer mutation | PASS: changed ns scale detected | |
| 32 | | Fresh recompiled Omega mutants | PASS: 7/7 killed | |
| 33 | | All four hardware fixture binaries | BUILD_ONLY PASS; never executed | |
| 34 | | Hardware / live RM / VFIO / chip qualification | NOT_RUN | |
| 35 | | MERGED / DEPLOYED | NO | |
| 36 | |
| 37 | The first lane commit registers the units. Generated C is checked bridge output; |
| 38 | it is not a second hand-written implementation. No compiler/bridge pin, external |
| 39 | dependency, header API contract, or hardware admission gate changes. |
| 40 | |
| 41 | ## Reproduction and command receipt |
| 42 | |
| 43 | Compiler: omega-mv `e5b32567`, `seed/out/omc` SHA-256 |
| 44 | `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`. |
| 45 | Use the base's existing `OMEGA_BRIDGE=~/work/cudastack/omega-bridge` and |
| 46 | `OMEGA_OMC=~/work/cudastack/omega-mv/seed/out/omc`. |
| 47 | Regeneration: `env OMEGA_OMC=... OMEGA_BRIDGE=... taskset -c 10-14 nice -n 10 sh om/units.sh` |
| 48 | returned rc 0, final line `wrote checked portable Omega units to .../src`. |
| 49 | |
| 50 | Every test, differential, mutant and simulation command runs inside: |
| 51 | |
| 52 | ```sh |
| 53 | bwrap --dev-bind / / --dev /dev --proc /proc -- \ |
| 54 | taskset -c 10-14 nice -n 10 COMMAND |
| 55 | ``` |
| 56 | |
| 57 | `COMMAND=python3 tests/om_fixture_rest_test.py` returned rc 0, final line: |
| 58 | `PASS fixtures BUILD_ONLY; HW NOT_RUN; mutants 7/7 KILLED`. |
| 59 | It builds both reference and Omega variants with `-ffp-contract=off`, compares |
| 60 | complete helper transcripts, exercises both individual flags, records gcov, |
| 61 | recompiles each mutant and finally **links without executing** the four fixture |
| 62 | binaries. `make test-engine-fixture-rest` registers the same focused acceptance. |
| 63 | The missing-unit negative returns a nonzero linker result, as required. |
| 64 | Text receipts accompany this file; compiled fixtures and mutant binaries are |
| 65 | not committed. Filed receipts replace the local home directory with `~`. |
| 66 | |
| 67 | ## Source-derived partitions |
| 68 | |
| 69 | `tests/om_fixture_rest_test.c` enumerates all scalar operations 0..19 and each |
| 70 | pair of the source boundary values. It tests every flush-word index including |
| 71 | the invalid sentinel, both reporting scales, and each bounded-text pattern. |
| 72 | |
| 73 | Existing focused gates also ran with the same no-device prefix and environment: |
| 74 | |
| 75 | | COMMAND | rc | Observed result | |
| 76 | | --- | --- | --- | |
| 77 | | `make -j3 test-om-eng-diff test-om-eng-red` | 0 | `PASS om eng diff: 44584 records identical (om vs C)`; flipped answer detected | |
| 78 | | `make -j3 test-om-eng-mutants` | 0 | `PASS om eng mutants: 16/16 killed` | |
| 79 | | `make -j3 test-gpu-wait test-gpu-wait-mutants host-tests-m16` | 0 | `OMEGA_GPU_WAIT_HOST PASS`, `OMEGA_GPU_WAIT_MUTANTS PASS`, `M16_GPU_WAIT_HOST PASS`, `M16_GPU_WAIT_MUTANTS PASS (3/3 killed)` | |
| 80 | | `make -j3 test-gpu-engine-sim` | 0 | engine `SUMMARY passed=346 failed=0`; matmul bounds `SUMMARY passed=6 failed=0` | |
| 81 | |
| 82 | These are additional host/simulator PASS receipts, not executions of the four |
| 83 | hardware fixtures. Full `make test` is intentionally NOT_RUN; the integrator |
| 84 | owns the aggregate gate. |
| 85 | |
| 86 | | Source/helper | Partition contract | |
| 87 | | --- | --- | |
| 88 | | Six clock conversions | seconds and nanoseconds at 0/1, unit scale boundaries ±1, UINT32_MAX, INT64_MAX, UINT64_MAX; ns multiplication wrap at seconds 18446744073 ±1 and remainder 709551615 ±1; ms multiplication wrap at seconds 18446744073709551 ±1 | |
| 89 | | Concurrent qualification | unsigned subtraction/wrap, ns-to-ms quotient, all eleven flush tail words and invalid index, 32-bit VA wrap boundaries | |
| 90 | | Requalification proc/payload checks | equality and inequality at byte/word/64-bit extrema; exact libcuda/libcudart match, mismatch, NUL termination and end-of-512-byte buffer | |
| 91 | | Lifecycle churn and invariants | size-cycle indices 7/8/9; byte pattern 254/255/256; index 0/1/max; sum/add/sub/max and result predicates at zero/nonzero and both Boolean classes; log period 1999/2000/2001 | |
| 92 | | Visibility submission | distinct/reuse count, uint32 truncation of `2*entries+3`, payload offsets around 0/1/127/128/129 and UINT32/UINT64 extrema; byte count and combined verdict | |
| 93 | | Reporting scales | each integer source edge converted to f64 and divided by MiB/GiB with exact `%a` comparison and contraction disabled | |
| 94 | | Error/proc bounded text | all five actual patterns at every start position 0..511, missing/partial patterns, early NUL, pattern length 0 and >32 | |
| 95 | |
| 96 | There are no floating-point inputs to the extracted functions: the reporting |
| 97 | function accepts ulong values, so negative zero, NaN, infinity and subnormal |
| 98 | input classes are not reachable API inputs. Integer zero and finite large values |
| 99 | are tested. This is not a claim about arbitrary floating-point conversion. |
| 100 | The existing clock behavior is unsigned modular arithmetic, including the |
| 101 | casts from `timespec`; no saturating/validation policy was added. |
| 102 | |
| 103 | `gcov.log` records the C oracle header at 95.24% lines, 100.00% branches |
| 104 | executed and 98.11% branches taken. The unexecuted control is the invalid private |
| 105 | opcode abort, outside the source-derived operation domain. Coverage does not |
| 106 | imply a hardware fixture ran. |
| 107 | |
| 108 | | Fresh `.om` mutant | Fault | Result | |
| 109 | | --- | --- | --- | |
| 110 | | ns_scale | multiply seconds by wrong ns scale | KILLED; red control | |
| 111 | | ms_divisor | divide nsec by wrong ms divisor | KILLED | |
| 112 | | size_cycle | use seven rather than eight churn sizes | KILLED | |
| 113 | | count_wrap | omit required uint32 submission-count wrap | KILLED | |
| 114 | | flush_offset | change flush address offset by one | KILLED | |
| 115 | | float_scale | change GiB divisor | KILLED | |
| 116 | | text_equal | invert bounded pattern equality | KILLED | |
| 117 | |
| 118 | ## Wolfram calculations used in extraction |
| 119 | |
| 120 | WolframLanguageEvaluator: |
| 121 | `{Quotient[2^64-1,10^9],Quotient[2^64-1,1000],Mod[2^64-1,10^9]}` |
| 122 | -> `{18446744073,18446744073709551,709551615}` (seconds/seconds/nanoseconds |
| 123 | for unsigned wrap partitions). |
| 124 | |
| 125 | WolframLanguageEvaluator: |
| 126 | `{BitOr[2*2^28,4*2^16,40/4],BitOr[2*2^28,5*2^16,92/4],2^31,FromDigits["46464646",16],1+2^20}` |
| 127 | -> `{537133066,537198615,2147483648,1179010630,1048577}` |
| 128 | (encoded words and fixture sentinel/address constants). |
| 129 | These are arithmetic facts, not hardware measurements. |
| 130 | |
| 131 | ## Chip runbook — NOT_RUN |
| 132 | |
| 133 | These fixtures open hardware and **must not be executed during host acceptance, |
| 134 | even under bwrap**. Their successful link is only BUILD_ONLY evidence. |
| 135 | A future operator must grant the current exclusive GPU window, confirm exact |
| 136 | revision/compiler/generated unit pins, and approve the family qualification |
| 137 | commands before running anything below. Never infer permission to stop services, |
| 138 | open a device, alter modules, clear a lock or run VFIO from this receipt. |
| 139 | |
| 140 | Inside that separately authorized window, use the four binaries built by the |
| 141 | focused runner in `build/fixture-rest/`: `m16_requalify`, `m16_concurrent`, |
| 142 | `lifecycle_gates` and `submission_visibility_gates`. Follow their existing family |
| 143 | runbooks/arguments, capture each exit code and complete gate transcript, repeat |
| 144 | the concurrency/lifecycle scenarios, and include the existing intentionally |
| 145 | refused submission/overflow/quarantine cases as negative controls. If comparison |
| 146 | against the default-OFF C reference is authorized, rebuild the same revision with |
| 147 | both flags set, run the same approved cases, and compare invariant outcomes |
| 148 | (timings are measurements, not expected byte-identical logs). Record a new |
| 149 | receipt with exact hardware, revision and commands. Until then hardware, |
| 150 | live-RM and VFIO are NOT_RUN, not PASS, and no roadmap row is upgraded. |