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 / chip-gates-shared-20261112 / README.md

89 lines · 5270 bytes Raw Blame History Rendered
1# Chip gates on the GB10, shared chip, 2026-11-12
2
3First run on the chip of the chip gates listed in `AGENTS.md` ("GPU commands") since the #280
4integration landed on main. Machine: DGX Spark (GB10, sm_121), NVIDIA open kernel module 580.173.02.
5
6The chip was **shared**: the live 35B model and a training job used it at the same time, and no
7window lock was held. These are value checks. No time printed in these logs is a claim, and this is
8not the exclusive window that `om/resident/README.md` and `om/gemm-any/README.md` ask for. Status
9for every row below is EXERCISED on the chip, not QUALIFIED.
10
11`$HOME` in the logs replaces the home directory of the account that ran them. Nothing else was
12edited.
13
14## Before: commit 5783a549 (`before-5783a549/`)
15
16| Step | Command | Result |
17|---|---|---|
18| doctor | `build/cudapp-doctor` | exit 0, READY |
19| hello-gpu | `build/hello_gpu` | exit 0, PASS |
20| hello-gpu red control | `build/hello_gpu_control --bug=short` | exit 1, FAIL, `checked 1048576 of 1048576 elements: 1 wrong, 1 never written` (as it must) |
21| elementwise | `build/gpu_elementwise_test --out elementwise.json` | **exit 139 (SIGSEGV)** |
22| mathlibs | `build/gpu_mathlibs_test --out mathlibs.txt` | exit 0, `mathlibs chip: PASS (938 checks)` |
23| resident | `build/gpu_resident_chip --chip` | **exit 1**, `cmdlist: marker wait timed out (latched)` |
24| zero-copy share | `build/zero-copy/chip-share` | exit 126: the host gate leaves the file mode 0644, so this step did not run |
25| decode attention | `build/gpu_decode_attn_test --out decode.json` | exit 0, `38 checks, 0 failed: PASS` |
26
27### elementwise
28
29`gdb` backtrace: `__memcpy_sve` from `run_abc` from `run_1d`. `run_1d` in
30`src/omega_gpu_elementwise_api.c` passed the plan slot `p[10]` as the byte count of each chunk.
31Since the per-chunk record (`av_ew_rec`) replaced the per-chunk plan call, that slot is not per
32chunk: a 4096-element EX2 copied 524288 bytes out of the device buffer into a 16384-byte result
33buffer. The host tier of the test never reaches `run_abc`, so only the chip showed it.
34Fix in 97fc9eb3: `bytes = ni * 4`, the expression the function had before commit 0b7c290e.
35
36### resident
37
38`resident-bisect/` holds the scratch copy of the chip test used to find the cause
39(`resident_dbg.c`: it prints the two sync words and the arena after the submit, and takes the layer
40count, CTA count, threads per CTA and model from the environment) and `runs.tsv`, one row per run:
41
42- one CTA, five layers: passes;
43- two CTAs, two layers: passes; three or more layers: marker timeout, arena correct, sync words
44 (counter, generation) = (threads per CTA - 1, 2), or one less;
45- two CTAs with one thread per CTA: passes.
46
47So the threads that were meant to leave at `@P0 EXIT` were running. `om/resident/resident.om`
48emitted `S2R` as a fixed-latency instruction. The compare two instructions later read the register
49before `S2R` had written it and saw the zero the prologue had stored, so no thread left. All lanes
50of both CTAs then ran the grid barrier; once the lanes of one warp split between the polling arm
51and the last-arrival arm, the polling lanes spun and the others never ran.
52
53The warp simulator has no instruction latency and passes this kernel. The static hazard checker
54(`src/omega_bw_hazard.c`) reports it (`hazard-before.txt`: two RAW findings on R18 with release 0,
55the two `S2R`), but no host test ran that checker on the resident kernel.
56`kernel-5layers-2ctas-before.sass` is this repository's own disassembler on the failing kernel;
57its two `??` lines are `ATOMG.E.EXCH.STRONG.SYS`, which the disassembler did not know.
58
59Fix in 97fc9eb3: `S2R` is emitted as a variable-latency instruction (`KVAR`), as
60`om/kgen/ew_emit.om` and `om/mathlibs/mathlibs_ir.om` already did; `cp` adds the zero register of
61the fixed plan instead of an absent source, which the encoder writes as R0. `gpu_resident_test`
62now runs the hazard checker on the encoded kernels (`hazard-after.txt`: 0 findings), and
63`gpu_resident_mutants.py` has the mutant `fixed-latency-thread-id`, which that check kills.
64The commit after it adds the resident kernels to the `bw_hazard_test` sweep and the
65`ATOMG.E.EXCH.STRONG.SYS` row to the disassembler (`om/disasm/sm121_dis.om` and the C oracle).
66
67## After: commit 97fc9eb3 (`after-97fc9eb3/`)
68
69All eight steps, binaries rebuilt at that commit (hashes in `job.log`):
70
71| Step | Result |
72|---|---|
73| doctor | exit 0, READY |
74| hello-gpu | exit 0, PASS |
75| hello-gpu red control | exit 1, FAIL with the expected line |
76| elementwise | exit 0, `PASS: 35 checks, 0 failed`, every mutant caught |
77| mathlibs | exit 0, `mathlibs chip: PASS (938 checks)` |
78| resident | exit 0, four lines `exact_f32=PASS` (resident and cmdlist-layers, both witnesses), `GPU RESIDENT CHIP PASS` |
79| zero-copy share | exit 0, `ZERO_COPY_SHARE_CHIP_PASS` (a copy of `build/zero-copy/chip-share` made executable for this run) |
80| decode attention | exit 0, `38 checks, 0 failed: PASS` |
81
82The live model answered `/health` with 200 after the run.
83
84## Not run
85
86- `build/gpu_gemm_any_test --chip` and the ceiling probes (`om/gemm-any/README.md`): they time
87 8192 x 8192 x 8192 products and must not run beside a live model. NOT_RUN.
88- Any exclusive, quiet window. NOT_RUN.
89- A second machine. NOT_RUN.