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 / C6-DISASM-OM / README.md

62 lines · 6057 bytes Raw Blame History Rendered
1# C6-DISASM-OM: Omega's own sm_121 disassembler in seeded Omega (CUDA++ C6, DRA-475, kanban t_81083ab1)
2
3Host evidence, Spark (GB10 host CPU, cores 10-11 under pool-10-11). No GPU was opened. GB10 device run: NOT_RUN by
4design. nvdisasm 13.0.85 (`/usr/local/cuda/bin/nvdisasm`, sha256
5`bc40070d596fa49b81c0905ca1d05e457aaec071280f742997d4a0b511781b25`) is an offline ORACLE only.
6
7## What changed
8
9- `om/disasm/sm121_dis.om`: the decoder, seeded Omega (omc e5b32567, sha256 `2c824805...`). Same rules as the C
10 decoder: the 61 rows of the C `ROWS` table (opcode, fixed bits, format string packed 8 ASCII bytes per ulong), the
11 same match rule (every bit outside the format's fields and the guard must equal the row), the IMAD-immediate names,
12 the special-register, compare and size names. The row table was generated by Wolfram from the C table
13 (`wolfram-rows.wl`); the transcription was checked by the SHA-256 Wolfram printed of its own output
14 (`f1578d7a5a10c285a276037eae31ad3a029faa1ee3a6556124e31d7892484787`, equal to `head -n 514` of the row block).
15- `om/units.sh` lowers it with the pinned omega-bridge (bc11b30b; toc.om / bridge-seeded pins unchanged) into
16 `src/cudapp_om_sm121_dis.c` + `.ident`; `src/cudapp_native.h` declares `omega_sm121_dis`.
17- `src/omega_sm121_disasm.c`: the public calls (`omega_sm121_disasm`, `omega_sm121_listing`,
18 `omega_sm121_padding_start`) keep their signatures and call sites. Default build: the Omega decoder; the file only
19 moves bytes and copies text. The hand-written C decoder is compiled only with `CUDAPP_MIGRATION_PENDING_C_DISASM`
20 (`make CUDAPP_DISASM=c`) or in the `diff` build, as the differential oracle, the same pattern as
21 `CUDAPP_MIGRATION_PENDING_C_ENCODER`.
22- Defect found and fixed in both decoders: S2R of special register 82 printed `SR82`; nvdisasm prints
23 `SR_GLOBALTIMERLO` (the device-trace emitter uses it). 82/83 are now named, and the 96 other special registers
24 nvdisasm names but our table does not are reported as `??` instead of guessed (`sr-sweep.sh`: all 256 values).
25- `tools/sm121dis/corpus.sh` writes `MANIFEST.tsv` and `PRODUCERS.tsv`; `check.sh` reports identical/differing kernels
26 and the instruction class of every differing word; new `negctl.sh` (flipped-bit control) and `om_mutants.sh`.
27- Readers moved off nvdisasm: `tests/device-trace/run-emitter-checks.sh`, `tools/artifact_smoke.sh`
28 (`NVDISASM-CALL-SITES.md` lists every call site in CUDApp and omega-mv with its class).
29- ZERO-NVDISASM static check, red at base f1b50cbf (15 lines), passes with `tools/sm121dis/oracle-allow.tsv`.
30
31## Normalisation rules (minimal)
32
33`oracle_pairs.sh` takes nvdisasm `-b SM121 -hex`: per instruction the address, low and high 64-bit words and the text
34up to and including `;`. Both sides then have every run of white space collapsed to one space. Nothing else: the space
35before `;` (nvdisasm omits it after the last EXIT) is reproduced by our listing, not normalised away.
36
37## Results (HOST_TESTED, Spark, 2026-11-07; logs in this directory)
38
39| Check | Log | Result |
40|---|---|---|
41| corpus + manifest (`corpus.sh`, 40 producer runs) | `01-corpus.log`, `MANIFEST.tsv`, `PRODUCERS.tsv` | 3,191 distinct kernels, 1,237,248 words; MANIFEST.tsv sha256 `0939127a973c165f163694a3fa4b4cb3ae398d9e80b8d8560c427eb073e2c4ce`; 789 kernels from the GPU tests, 2,402 from the hazard sweep |
42| parity, Omega decoder vs nvdisasm (`check.sh`) | `02-check.log` | total 3,191 / identical 3,191 / differing 0; 1,237,248 words; differing instruction classes: none; VERDICT PASS |
43| red: C oracle with planted fault (`SM121DIS_MUTANT`) | `04-red.log` | VERDICT FAIL as required: 3,190 of 3,191 kernels differ (the one left is EXIT-only), classes listed |
44| differential, .om vs C decoder on every corpus word | `05-diff-negctl.log` | agree on all 3,191 kernels; the selftest build (bit 16 flipped on the C side) aborts, exit 134 |
45| flipped-bit control (`negctl.sh`) | `05b-negctl.log` | 3,191 / 3,191 kernels: parity broken in exactly word 0; 3,190 still equal nvdisasm on the flipped word, 1 reported `??` (an EXIT whose bit 16 nvdisasm ignores); VERDICT PASS. (`05-diff-negctl.log`: the first, serial run hit the 19-minute hold, exit 124, not counted) |
46| .om mutants via pinned omc + bridge (`make test-sm121dis-om-mutants`) | `06-om-mutants.log` | 3 / 3 red: 848,916, 243,660 and 25,245 corpus words print differently |
47| `make test-bw-hazard-nvdisasm` | `03-bw-hazard-nvdisasm.log`, `03b-symbols.log` | PASS: 2,342 kernels, 1,031,048 instructions, 0 mismatched; 2,607 checks, 0 failed; binary links `omega_sm121_dis`, no `c_sm121_disasm` |
48| `om/units.sh --check` (make test-om-units) | `07-test-om-units.log` | PASS, byte for byte |
49| decoder users: test-gpu-elementwise, -fp8, -reconv, -attention, -mathlibs, -latmeas, test-bw-hazard, test-bw-ldg-mmio, test-om-encoder | `07-*.log` | all exit 0 |
50| `make test-zero-nvdisasm` | `07-test-zero-nvdisasm.log`, `zero-nvdisasm-static.log` | PASS (static clean with oracle-allow.tsv; 6 commands under strace, decoy never called); red check FAILs as required; static was FAIL at base (15 lines) |
51| device-trace emitter (`tests/device-trace/run-emitter-checks.sh`, reads with ours, NVDISASM oracle) | `device-trace-emitter.log`, `-red.log` | PASS, oracle text equal on 40/40; with the red decoder exit 1 |
52| SR sweep 0..255 (`sr-sweep.sh`) | (scratch) | 160 equal nvdisasm, 96 reported `??`, 0 printed wrong |
53
54## NOT_RUN
55
56- GB10 device run (by design: no GPU on this card).
57- the full `make test` (only the targets above); `make test-sm121dis` as one target (its steps ran one by one under
58 separate pool holds with the same commands: s01/s04/s05 and step.sh here).
59- `tools/extract/drift.sh` against omega-mv (drift is Omega-side change; this branch changes CUDA++ only).
60- `tools/artifact_smoke.sh` (needs exported artifacts) and test-om-spec-encoder.
61- omega-mv: the same port there (listed in NVDISASM-CALL-SITES.md).
62- the corpus at 7919aada (2,980), so the +211 to 3,191 is not split per generator beyond gpu_mathlibs_test's 36.