interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tools / sm121dis / README.md

47 lines · 3064 bytes Raw Blame History Rendered
1# sm121dis: Omega's own GB10 disassembler
2
3A disassembler turns the GPU's machine code back into readable instructions. Omega used to borrow NVIDIA's
4`nvdisasm` for that, in every check that reads a kernel back. `sm121dis` is Omega's own (row C6 of `docs/OMEGA.md`):
5the decoder is `src/omega_sm121_disasm.c`, this folder holds the command line and the comparison with NVIDIA's tool.
6
7## What it proves
8
9- Every kernel the library builds without the chip (each GPU test in its host-only and simulator modes, the
10 numeric kernels, and every kernel the hazard checker's sweep builds) is collected and compared word by word with
11 `nvdisasm`, text and spacing included. All 2,980 kernels (1,218,992 instruction words) agree (2026-10-30, host).
12 The receipts in `evidence/C6-DISASM/` predate the sweep kernels: 331 kernels (59,152 words) on 2026-10-24, 402 kernels
13 (74,096 words) on 2026-10-25.
14- A copy of the decoder with one planted fault (`SM121DIS_MUTANT`, first source register off by one bit) must fail
15 that comparison with a verdict, and does on 2,979 of the 2,980 kernels. The one it cannot touch is a sweep kernel of
16 32 words that is only EXIT, a branch and padding: it has no source register for the fault to change.
17- A kernel that could not be saved whole (a full disk) fails the collection; it is never compared cut short.
18- A word the decoder does not know is printed as `?? <hex>` and fails the check. It is never guessed.
19
20## How to run it
21
22 make test-sm121dis # collect, compare with nvdisasm, then the red check
23
24`nvdisasm` is used only here, as the reference to compare against. Nothing it prints goes into a kernel.
25
26## Who uses it
27
28The checks that used to call `nvdisasm` now call Omega's:
29
30- the listing checks inside `tests/gpu_elementwise_test.c`, `gpu_fp8_api_test.c`, `gpu_reconv_test.c`,
31 `gpu_attention_test.c` and `bench/prime_race/tests/gb10_sieve_host_test.c` (linked in, `omega_sm121_listing`);
32- `tools/divsqrt_nvdisasm_check.sh`, `tools/ldst_nvdisasm_check.sh` and `make test-numeric-reduce-nvdisasm`
33 (the `build/sm121dis` command);
34- the hazard checker's register cross-check, `tests/bw_hazard_test.c --disasm` (`make test-bw-hazard-nvdisasm`,
35 linked in, `omega_sm121_disasm`), over every kernel its sweep builds. Those kernels are in the comparison corpus.
36
37The script and target names are kept so older receipts still line up. `make test-zero-nvdisasm` proves that none
38of these checks runs `nvdisasm`.
39
40## Files
41
42| File | Job |
43|---|---|
44| `sm121dis.om` | command line (pure Omega, composed with `gpu/nvidia/om/disasm/sm121_dis.om`): a listing, `-b SM121` (called like nvdisasm), `--pairs` (for the comparison), `--version` |
45| `corpus.sh` | runs every GPU test with `OMEGA_KERNEL_DUMP_DIR` set, so each kernel the library encodes is saved |
46| `check.sh` | compares its text with nvdisasm's for every saved kernel, `SM121DIS_JOBS` at a time (default: every CPU the process may use); PASS only when every word agrees |
47| `oracle_pairs.sh` | turns nvdisasm's listing into the same one-line-per-word form |