interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / evidence / speculation / release-candidate-teardown / README.md

99 lines · 5419 bytes Raw Blame History Rendered
1# Release candidate: native cleanup ownership repair
2
3Refs #65. This candidate is CUDApp `main` 22e9d9b plus the two commits of
4PR #71, cherry-picked unchanged. PR #71 merged into
5`experiment/27b-adaptive-sizing` (52db648), not `main`. The four files it
6changes are blob-identical to 52db648. No other experiment code is included.
7This candidate does not finish #65.
8
9Candidate code commit: `2e2421694f6110bd84885ae0b2d3caf249809d34`.
10Exact hashes and raw results are in `receipt.json`.
11
12## What was run, on Linux AArch64 (GB10, driver 580.173.02)
13
14| Check | Result |
15| --- | --- |
16| Pinned compiler rebuilt from seed, Omega d7390d88, fresh clone | omc `9749f388…` matches the pin; stage1 = stage2 = stage3 |
17| `run-teardown-host.sh`, original f9cd649 cleanup | exit 1, `NATIVE_TEARDOWN_HOST_FAIL` (test assertion, no compile error) |
18| `run-teardown-host.sh`, repaired cleanup | exit 0, `NATIVE_TEARDOWN_HOST_PASS` |
19| Same, second run | identical unit and ELF hashes |
20| Ten mutants of the repaired cleanup (`mutants.sh`) | 7 killed by assertion, 1 detected by trap 5, 2 survived (see below) |
21| Vector host regression | `VECTOR_CHECKS_HOST_PASS`, byte-identical to the 0cf8cd7 receipt |
22| GB10 vector test, wrong-math control, corrected recovery | exit 0, `NATIVE_SM121_VECTOR_PASS`, 0 failed syscalls |
23
24The fixture covers retained mapping ownership after a refused unmap (BAR,
25channel, buffer and the unpublished mapping), repeated refusal across two
26shutdown attempts, eventual release on a later retry, one close attempt per
27descriptor with no repeated driver calls, and a sticky fault that keeps
28refusing `nvstart` after cleanup. Mutants M1 to M6 and M8 break one of these
29each and are killed by the fixture's own assertion.
30
31The GPU run used a shared spark-window (`--gb10 shared --quiet none`) for
3211 seconds of test run (17 seconds of window) beside the live model server. A model-list request to that server succeeded just before and just after; those two checks were not saved as files.
33It is a correctness result. No timing or performance is claimed. Older
34receipts were used only to check the build recipe; the same recipe applied to
350cf8cd7 reproduces that receipt's unit `b3a36ac6…` and ELF `e3da26b0…`.
36
37## Known gap
38
39The only faulted-mapping case has the context closed (state 2) and faulted
40together. Either half of the new `nvcpumap` guard alone satisfies it, so
41mutants M7b and M7c survive. Removing the whole guard is caught only by a
42runtime trap (exit 105). A faulted context that is still live (state 1) is
43not exercised. The repair is unchanged here; a fixture case for that state
44is a follow-up.
45
46## Reproduce from a clean checkout
47
48Requires Linux AArch64. Steps 1 to 3 use only the CPU. Step 4 needs a
49GB10 and a chip window.
50
51```sh
52# 1. Pinned compiler, built from seed (no C toolchain involved)
53git clone https://github.com/aien-dev/omega-mv.git omega && cd omega
54git checkout --detach d7390d88d07dbf48cfbb0583070599c350f814d3
55sh seed/omega-from-seed.sh # last line RC=0
56sha256sum seed/out/omc # 9749f38841a55917d41924a68bce31463ec2339910bddd5e6cbf6ea4420551db
57OMC=$PWD/seed/out/omc; cd ..
58
59# 2. Candidate and teardown red/green
60git clone https://github.com/aien-dev/CUDApp.git cudapp && cd cudapp
61git checkout --detach <PR head> # adds only evidence and docs on top of 2e24216
62git diff --stat 2e2421694f6110bd84885ae0b2d3caf249809d34 HEAD -- native tests # empty
63sh tests/speculation/run-teardown-host.sh "$OMC" # PASS line, exit 0
64
65# 3. Mutants (outputs in ../mutants)
66sh evidence/speculation/release-candidate-teardown/mutants.sh "$PWD" "$OMC" "$PWD/../mutants"
67
68# 4. GPU test unit: files joined with one blank line after each of the first three
69T=tests/speculation
70k=$(grep -n '^fn trial ' $T/native-kernel-test.om | cut -d: -f1)
71{ cat native/nvrm/context.om; echo; cat native/blackwell/vector.om; echo
72 cat native/blackwell/launch.om; echo; head -n $((k-1)) $T/native-kernel-test.om
73 cat $T/vector-checks.om; tail -n +$k $T/native-kernel-test.om; } > kernel-unit.om
74"$OMC" < kernel-unit.om > kernel.elf && chmod 700 kernel.elf
75sha256sum kernel-unit.om kernel.elf # ff29f45a… and b0754a4e…
76# In an admitted chip window only (Spark: spark-window open NAME --gb10 shared --quiet none):
77./kernel.elf # NATIVE_SM121_VECTOR_PASS, exit 0
78```
79
80The vector host regression row is rebuilt with the recipe in
81`docs/speculation/NATIVE-KERNEL.md` (declarations before `fn supply` in
82`vector-checks-test.om`, then `vector-checks.om`, then the remainder) and runs
83on the CPU. `mutants.sh` merges the two scripts that produced `mutants.log`.
84
85Exit 77 or `NOT_RUN` from the teardown script means an unsupported host and
86is not a pass.
87
88## Remaining dependencies
89
90- An independent rerun of step 4 on the PR head by someone other than the
91 author of this receipt.
92- The live-state faulted `nvcpumap` fixture case above.
93- Everything else #65 asks for: FP8 arithmetic, the 27B model, speculative
94 state rollback, AIENOS attachment and the four-arm comparison.
95- Review follow-ups (not defects in this candidate): add `maphold`,
96 `mapbind`, `mapaddr`, `mapget`, `mapset`, `mapwrite`, `sleepns` and `monons`
97 to the composer's escape guard; pin the before arm to 22e9d9b (same
98 `context.om` blob as f9cd649, which lives only on side branches); the early
99 `nvcpumap` failure paths ignore a failed descriptor close (pre-existing).