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 / seed / sm121 / README.md

117 lines · 8599 bytes Raw Blame History Source

seed/sm121/: rung 6, GPU words from the same chain

The ladder in seed/ (see seed/README.md) grows a toolchain from a few hundred hand-written bytes. Rung 2 is asm2, a small assembler: it reads a plain-text table of instructions, then a program written with those names, and writes machine words. Until now it only knew the main processor (Arm). This rung teaches the same asm2, unchanged, the instructions of the GB10's graphics chip (NVIDIA calls this generation sm_121), by giving it a second table. Nothing new was compiled to do it: the new part is text.

What is here

Build

gate6.sh needs the reference tool at build/seed/r6/sm121list. Build it from the repository root, then run the gate:

mkdir -p build/seed/r6
gcc -O1 -Isrc -o build/seed/r6/sm121list seed/sm121/sm121list.c src/omega_blackwell_codegen*.c \
  src/omega_blackwell_matmul.c src/omega_blackwell_encoder.c src/omega_gpu_fmt.c src/omega_om_units.c -lm
sh seed/sm121/gate6.sh

The gate writes its result files to build/seed/r6/evidence/. The recorded receipt evidence/SEED-0/sm121/ is only read: the gate's last line before the verdict says whether each result file equals its recorded copy (seed/check/receipt.sh); a rerun never rewrites it.

How the checks work

The C code generator is the referee, never an input to the table: I read its source and wrote the table by hand; the gate then compares.

  1. Every program my C generators make today, over a sweep of their settings (sizes, warp counts, depths, and the deliberately broken "mutant" versions the tests use), is written out as a listing; asm2 with the new table turns each listing into words; the words must equal the C code's words, bit for bit.
  2. Every instruction form, with registers and numbers at the edges of their fields, the same way.
  3. The hand-written vector add must equal, byte for byte, the words the existing launcher runs.
  4. Controls: a wrong register, a wrong offset, an out-of-range register, a wrong bit in the table and a field in the wrong place must each be caught.
  5. Reference only: NVIDIA's disassembler (nvdisasm -b SM121) reads every instruction form back, and its name is compared with the name my C code gives it. Every difference is listed.
  6. On the chip: the seed-made vector add runs on the GB10 through the existing launcher (no CUDA library), with a receipt.

Results: build/seed/r6/evidence/; recorded receipt: evidence/SEED-0/sm121/.

Limits, said plainly

Results (gate run 2026-10-20 03:04 UTC, after merging seed/birth, evidence/SEED-0/sm121/gate6.log)

What the check found in my C code (not in the table)

  1. A crash in the tensor-core matrix multiply generator. It accepts "4 row tiles, 1 warp", then writes 16 entries into lists that hold 8 and overwrites memory. The 48 settings that do this are skipped here and named in notes-summary.tsv; a fixer agent is repairing the generator (ledger L149).
  2. Two labels swapped in the header. The instruction listed as "uncached load" is really the evict-first load, and the one listed as "evict-first store" is really the uncached store. The encoder's own comments and NVIDIA's disassembler agree on what the bits mean, so programs behave as the encoder intends; only the labels in src/omega_blackwell_codegen.h are wrong.
  3. A compare that is unsigned where the name suggests signed. The register-against-uniform form of "greater or equal" compares as unsigned numbers. No program uses that form today, so nothing is affected yet.
  4. Some numbers are taken raw, unchecked. For shared-memory loads and stores the number is the size field itself, and for the floating-point compare it is the whole condition word. The C code accepts any value, including ones that are no real size or condition (the disassembler shows them as other sizes or refuses them). Real programs only use valid values (32-bit and 128-bit shared-memory accesses).
  5. Two instructions ignore a requested schedule. For IADD3 and EXIT the C code always writes its own scheduling bits, whatever the program asked for (notes-summary.tsv); the table does the same.

The disassembler check (reference only)

NVIDIA's disassembler (nvdisasm 13.0, used only to read my bits back, never to make any) read 45,024 of the 65,352 edge cases. It refused 20,328: 20,104 of them have the scheduling word set to all ones on purpose, and 224 are the floating-point compare with a made-up condition word (item 4). Of 68 instruction forms, 59 got the same name from the disassembler as from my C code; the 9 others are the items above plus naming detail (for example IMAD.MOV is how the disassembler shows a multiply-add whose inputs make it a plain copy).