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 / device-trace / emitter-safety-host-20261026 / REPRODUCE.md
| 1 | # Local host-only repair evidence |
| 2 | |
| 3 | Read `receipt.json` for exact source, compiler, oracle, output hashes, statuses, |
| 4 | negative controls, and unverified boundaries. Its source commit is a local |
| 5 | isolated commit; file hashes identify the tested bytes independently of later |
| 6 | publication metadata. No native AArch64 or GPU output was executed. |
| 7 | |
| 8 | The native commands for an appropriate AArch64 host are in |
| 9 | `tests/device-trace/README-safety.md`. The existing disassembler runner is not |
| 10 | green: its inherited golden describes the old pointer bug. No gate was bypassed |
| 11 | and no NVIDIA-tool listing was committed to conceal that mismatch. |
| 12 | |
| 13 | ## External oracle setup |
| 14 | |
| 15 | Obtain the existing `tools/omega_ref/omega_ref.c` from Omega commit |
| 16 | `190130b71d0a59b93f01c515218a5509b149a145` in a separate test workspace. Check |
| 17 | its SHA256 against the receipt before compiling it: |
| 18 | |
| 19 | ```sh |
| 20 | cc -O2 -g -std=gnu11 -Wall -Wextra -Werror -o omega_ref omega_ref.c -lpthread |
| 21 | ``` |
| 22 | |
| 23 | Obtain the compiler source `seed/omc/omc.om` at the separate compiler revision |
| 24 | in the receipt. Confirm both source and independently recorded seeded binary |
| 25 | digests. The measured self-output command was: |
| 26 | |
| 27 | ```sh |
| 28 | ./omega_ref check omc.om |
| 29 | ./omega_ref run omc.om < omc.om > compiler-self.elf 2> compiler-self.stderr |
| 30 | sha256sum compiler-self.elf |
| 31 | ``` |
| 32 | |
| 33 | It exited zero with empty stderr and matched the independently recorded |
| 34 | `499236398aabc652e2dae27fe4bdc4c5db3d3726314356e0dbef23e3345803ec` digest. |
| 35 | This is compiler-source execution by an external referee, not native compiler |
| 36 | execution or seed-chain qualification. |
| 37 | |
| 38 | ## Original versus projected units |
| 39 | |
| 40 | Compose the four original units as documented in the test README. The frozen |
| 41 | oracle predates `const` and refuses the unmodified emitter with error 16. |
| 42 | For semantic tests only, a separate copy was projected mechanically: |
| 43 | |
| 44 | 1. Collect `const NAME ulong VALUE` lines. The emitter contains only decimal |
| 45 | unsigned-long literal constants and has no shadowed constant names. |
| 46 | 2. Remove those declaration lines. |
| 47 | 3. In non-`note` lines, replace whole `NAME` tokens with `ulong VALUE`. Preserve |
| 48 | all other text. Do not change the original units. |
| 49 | |
| 50 | For each original `unit.om` and its `unit.projected.om`: |
| 51 | |
| 52 | ```sh |
| 53 | ./omega_ref check unit.projected.om |
| 54 | ./omega_ref run unit.projected.om > unit.stdout 2> unit.stderr |
| 55 | ./omega_ref run omc.om < unit.om > unit.elf 2> unit.compile.stderr |
| 56 | ./omega_ref run omc.om < unit.projected.om > projected.elf 2> projected.compile.stderr |
| 57 | cmp unit.elf projected.elf |
| 58 | ``` |
| 59 | |
| 60 | All final checks/runs/compiles exited zero with empty stderr, and every `cmp` |
| 61 | matched. The four original and projected ELF hashes are recorded separately. |
| 62 | They are AArch64 outputs and were **not executed**. Semantic execution claims |
| 63 | refer only to the explicitly projected unit under the external oracle. |
| 64 | |
| 65 | ## Red tests and mutation controls |
| 66 | |
| 67 | Before production changes, the original emitter test passed while the new |
| 68 | address, guard, and whole-kernel tests failed with statuses 3, 1, and 1. After |
| 69 | test refinements, repeat the same composition against the exact original PR84 |
| 70 | source from `git show 60d6c57fc6821accce0027d65dd239355beeb543:native/blackwell/trace-emit.om`. |
| 71 | The compiler accepted those final red units, and they still failed 3, 1, and 1. |
| 72 | |
| 73 | Apply each mutation in a disposable source copy, never in the working tree. |
| 74 | The receipt lists the expected failing test and its measured status: |
| 75 | |
| 76 | - Restore multiply-base-low plus high-copy address instructions. |
| 77 | - Restore the original `on == 1 && checks == 0` gate. |
| 78 | - Accept any nonzero `checks` instead of requiring exactly 1. |
| 79 | - Skip the body refusal entirely. |
| 80 | - Apply the body refusal only to `on == 1`. |
| 81 | - Compare predicate bits as part of EXIT instead of masking them. |
| 82 | - Set bit 16 or the sign bit of a store's signed 24-bit byte offset. |
| 83 | - Set the branch high displacement word, or its upper encoded bits. |
| 84 | |
| 85 | All ten mutated units were accepted by the compiler and reference checker, |
| 86 | but failed their semantic tests. Independent review repeated the four final |
| 87 | unit runs and all ten mutation runs. Two initial test gaps and compiler |
| 88 | register-pressure corrections are preserved in the receipt, not hidden. |
| 89 | |
| 90 | ## External decode and full-suite boundary |
| 91 | |
| 92 | A dump unit calls `gtewrap 1 2` with an empty body and writes `gbout` to stdout. |
| 93 | Its original and projected forms compiled to identical ELF bytes. The projected |
| 94 | oracle run produced the GPU words, decoded offline with: |
| 95 | |
| 96 | ```sh |
| 97 | nvdisasm --binary SM121 words.bin > decoded.sass |
| 98 | diff -u tests/device-trace/expected.sass decoded.sass |
| 99 | ``` |
| 100 | |
| 101 | The disassembler exited zero. The diff exited one: only the two address |
| 102 | instructions per marker changed, as intended. The downloadable official tool |
| 103 | archive and all local output hashes are in the receipt. Those binaries and |
| 104 | listings stay outside the repository. |
| 105 | |
| 106 | `make test` was attempted on both the base and repaired source. Both failed |
| 107 | building `build/omega_blackwell_engine.o`, because the x86 assembler rejects |
| 108 | the existing AArch64 `ds` instructions. No host suite success is claimed. |
| 109 | The instruction scheduler, GB10 memory effects, launch geometry, visibility, |
| 110 | overhead, and runtime overflow still require their separate authorized native |
| 111 | and hardware work. No hardware authorization was requested or inferred. |