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 / gpu / amd / README.md

63 lines · 4129 bytes Raw Blame History Rendered
1# gpu/amd: the AMD gfx942 back end
2
3Seeded Omega that targets the AMD Instinct MI300X (gfx942) through the Linux KFD interface, without
4ROCr or HIP in the production path.
5
6| Path | What it is |
7| --- | --- |
8| `gfx942/hsaco.om` | Writes HSA code objects (ELF, code object v5) from declarative kernel tables (`gfx942/*.isa`). |
9| `gfx942/*.isa` | The kernel tables: instruction words and kernel metadata, read by `hsaco.om`. Data, not code. |
10| `gfx942/exec/` | A host executor for the gfx942 instructions the kernels use (`fp.om`, `fma.om`, `main.om`), so kernels can be checked on a CPU. |
11| `gfx942/rope.om` | Rotary position tables for the Qwen3.8-27B configuration: one u32 position in, 32 cos and 32 sin binary32 words out. |
12| `kfd/` | KFD ioctl requests, AQL dispatch packets, kernel arguments, records and the queue ring, with a shared CLI (`kfd/cli.om`); `kfd/requests.tsv` is the request table they read. |
13| `kfd/launch/` | The direct-KFD launcher (`omega-launch`); its x86-64 build ran Qwen3.8-27B-FP8 on an MI300X. |
14| `tests/amd-exec/*-probe.om` | Probe programs for the executor (semantics, rows, FMA, transcendental, rope frequencies). |
15| `bench/barrier/` | Host bench for a persistent grid barrier against AQL dispatch. No packet is submitted. `bench/barrier/README.md`. |
16| `gate.om`, `card.tsv` | The gate and the receipt-recorded bytes it checks. |
17| `import/` | How this came from CUDApp. |
18
19This code came from CUDApp main `dc536882c06a692991be97dc65cd2d037d82b129` with the history of these
20files (`import/filter-repo-command.txt`). Old paths: `backend/amd/` became `gpu/amd/`, `backend/targets.om`
21became `gpu/targets.om`, `tests/amd-exec/*-probe.om` became `gpu/amd/tests/amd-exec/`.
22
23## The gate
24
25```
26tests/gates/run.sh gpu-amd
27```
28
29That builds `gpu/amd/gate.om` (with `seed/ng/sha256.om`) using `seed/out/omc` and runs it. The gate,
30in Omega:
31
321. refuses any compiler whose sha256 is not the one in `seed/out/omc.sha256` (exit 69, nothing built);
332. builds every unit (the writer, the loader table, the executor, rope, the four KFD units, the launcher
34 for AArch64 and x86-64, the five probes) twice and requires exit 0, empty stderr and identical bytes;
353. checks the bytes in `card.tsv` against the sha256 their receipts record: the 18 model kernel objects,
36 `vadd.hsaco` and the x86-64 launcher, which ran on the MI300X, and the AArch64 launcher, a host-built
37 reference that never ran on the card (printed as `reference`); each object must also pass
38 `targets load AMDGPU_HSACO FILE gfx942`;
394. runs three controls that must be caught: a compiler one byte longer, a kernel table with one
40 descriptor word changed, a missing table.
41
42It ends with `OMEGA-GPU-AMD PASS ... hardware=NOT_RUN`. It opens no device.
43
44## What ran on hardware
45
46The receipt for the MI300X run stays in CUDApp where it was written:
47`evidence/amd-qwen38-native-refusal-20261113/` (Qwen3.8-27B-FP8 through the direct-KFD launcher on an
48x86-64 host). Its `native/MANIFEST.json` records the x86-64 launcher (`omega-launch`), `vadd.hsaco` and the
4918 model kernel objects. Those results carry over to this code only through byte identity, which the gate
50checks for each of them. The AArch64 launcher never ran on the card.
51
52## Not yet Omega (still in CUDApp)
53
54The files of CUDApp's AMD back end that are not Omega, and what became of each, are listed in
55`NOT-YET-OMEGA.tsv`, generated by `rest/classify.om` from `rest/classes.tsv` over the CUDApp tree it
56names (`rest/README.md` gives the command). Its class column says, for each file: (a) its behaviour is
57rewritten in Omega and checked by `rest/gate.om` against tables the file recorded, (b) it stays in CUDApp
58as an oracle or instrument, or (c) it is obsolete (the launcher's own compiler pin: under ADR 0047
59Decision 4 a moved piece carries no pin of its own; the gates use `seed/out/omc.sha256`). The old files
60stay in CUDApp as the oracles that recorded the tables.
61
62What `rest/gate.om` does not replay (cases that need CUDApp's instruments, and every hardware row) is
63listed in its tables as `notrun` rows and printed as NOT_RUN; those checks run only in CUDApp.