Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/ng/gpu/README.md # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / ng / gpu / README.md` 57 lines · 4813 bytes Raw Blame History Rendered 1 # seed/ng/gpu: the sm_121 path of Omega NG (Hive NG lane ng-gpu) 2 3 Omega NG's GPU stage turns ΩIR kernel functions into sm_121 machine code and launches it. It consumes the seeded 4 units `gpu/nvidia/om/encoder/bw_enc_sm121.om`, `gpu/nvidia/om/components/bw_alloc.om` and 5 `gpu/nvidia/om/cubin/cubin_elf.om` (with `gpu/nvidia/native/blackwell/launch.om` and `gpu/nvidia/native/nvrm/context.om` 6 also pinned). They came from aien-dev/CUDApp at `1988c50e` with their history (now at `84b524ca`'s bytes, see Status), per 7 ADR 0047 (aien-architecture-mv; the GPU layer of Sovereign Intelligence moves into this repository); before that, Hive 8 NG decision D10 consumed them from a sibling `../CUDApp` checkout. `seed/ng/cudapp.lock` keeps its bytes: its five 9 digest rows are the identities the `lock-*` cases check against the files in `gpu/nvidia/`. ng-gpu's own code is 10 `seed/ng/src/gpu.om` (functions `gp_`, globals `g_`), which does not exist yet: it waits for ng-ir's ΩIR kernel form. 11 12 What is here today: the conformance gate of the encoder ng consumes. 13 14 | File | Role | 15 |---|---| 16 | `encrun.om` | Program-mode harness composed after the pinned encoder: NGBWENC1 frames in, result frames out (format in its header). | 17 | `pinsum.om` | SHA-256 filter (stdin to 64 hex digits and a newline), composed after the plain-function form of `om/sha256/sha256-om2.om`; the lock-* cases use it. | 18 | `gate.cases` | Case list for `seed/qualification/om2/gate.om`: 6 lock pins, compiled-bytes pin of the encoder, 4 fixture sets, 3 refusals, 4 mutants. | 19 | `tests/golden.*` | 145 single-instruction encodes of CUDApp's golden fixtures (140 accepted, 5 refused). | 20 | `tests/dump.*` | 14 fixture programs of CUDApp's codegen dump. | 21 | `tests/slice.*` | 52 frames (every 64th of 3265, plus the last) of CUDApp's sm121dis corpus producers. | 22 | `tests/ldg.*` | The bw_hazard_test program (310 insns) with two LDG.E +0x40 loads (CUDApp#373). | 23 | `tests/badmagic.*`, `tests/trunc.*` | Malformed input: exit 2 / exit 3 with one stderr line. | 24 | `tests/m1..m4.{from,to}` | Encoder mutants, applied by `subst`: CUDApp mk/om-encoder.mk OM_ENC_MUTANTS 1..3 and OM_ENC_LDG_RED's first edit (the pre-fix LDG.E line). | 25 26 Run from the repository root (no CUDApp checkout is needed): 27 28 seed/out/omc < seed/qualification/om2/gate.om > /tmp/gate && chmod +x /tmp/gate 29 /tmp/gate seed/out/omc "$(cut -c1-64 seed/out/omc.sha256)" seed/ng/gpu/gate.cases /tmp/ng-gpu-gate 30 31 Final line `OM2GATE PASS cases=18 pass=18 ...`. 32 33 The lock is enforced by the gate: the `lock-*` run cases hash each file ng composes from `gpu/nvidia/` (the five rows 34 of `seed/ng/cudapp.lock`) and the lock file itself with `pinsum.om` and compare the digest with the pinned one. A 35 different file makes its case FAIL and the gate exit 1, naming the row; a missing file is INVALID (exit 3). A wrong 36 file is FAIL rather than INVALID because the shared `seed/qualification/om2/gate.om` has no input-identity case 37 kind; adding one is a separate proposal for the OM-2 owner (the gate's binary hash is replayed by historical 38 records such as security673/relational). A lock edit needs the matching `lock-*` rows in gate.cases. 39 40 ## Fixture provenance 41 Inputs were captured from CUDApp's real C builders (`tests/test_omega_codegen_freestanding.c --golden/--dump` and 42 `tools/sm121dis/corpus.sh` producers, CUDApp `b774723f`) through a link-time wrap of `omega_bw_enc_sm121` that appends 43 each call's arguments and result to a file. The wrap and the C-oracle replayer are referee instruments, kept outside 44 every repository (history: CUDApp ``b056bf7e`:evidence/ldg-offset-`20261107`/{ngcap.c,encref.c}`; removed from CUDApp at 45 its desk review; on the Spark at `~/handoffs/hive-ng/gpu/evidence/ldg-offset-`20261107`-instruments/`); nothing here 46 builds or runs C. Expected 47 outputs: golden and dump are the bytes on which CUDApp's `.om` encoder and its C oracle agreed; slice and ldg are the C 48 oracle's bytes, which the pinned `.om` encoder reproduces and CUDApp `b774723f`'s (before #373) does not (LDG.E offset defect). 49 50 ## Status 51 HOST_TESTED (Linux AArch64, core 1): 18/18 PASS with CUDApp at the then lock commit `1988c50e`; with CUDApp `1818e9d2` (only 52 bw_alloc.om differs) lock-bw_alloc FAILs and the gate exits 1; against CUDApp `b774723f`'s encoder (before #373) the 53 pin, slice and ldg cases FAIL as well. No GPU involved. After the move to `gpu/nvidia/` (2026-11-14) the same 18 cases, 54 with the same digests and goldens, run against the in-tree files; see `gpu/nvidia/README.md`. Later that day the 55 encoder and `cubin_elf.om`, then `launch.om` in its own commit, were replaced by CUDApp `84b524ca`'s bytes, the commit 56 the lock now names: the lock rows, `lock-self` and `enc-pin` were re-pinned, the goldens, refusals and mutants are 57 unchanged, and 18/18 pass. No case checks `launch.om` beyond its identity.