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 Source

gpu/amd: the AMD gfx942 back end

Seeded Omega that targets the AMD Instinct MI300X (gfx942) through the Linux KFD interface, without ROCr or HIP in the production path.

PathWhat it is
gfx942/hsaco.omWrites HSA code objects (ELF, code object v5) from declarative kernel tables (gfx942/*.isa).
gfx942/*.isaThe kernel tables: instruction words and kernel metadata, read by hsaco.om. Data, not code.
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.
gfx942/rope.omRotary position tables for the Qwen3.8-27B configuration: one u32 position in, 32 cos and 32 sin binary32 words out.
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.
kfd/launch/The direct-KFD launcher (omega-launch); its x86-64 build ran Qwen3.8-27B-FP8 on an MI300X.
tests/amd-exec/*-probe.omProbe programs for the executor (semantics, rows, FMA, transcendental, rope frequencies).
bench/barrier/Host bench for a persistent grid barrier against AQL dispatch. No packet is submitted. bench/barrier/README.md.
gate.om, card.tsvThe gate and the receipt-recorded bytes it checks.
import/How this came from CUDApp.

This code came from CUDApp main dc536882c06a692991be97dc65cd2d037d82b129 with the history of these files (import/filter-repo-command.txt). Old paths: backend/amd/ became gpu/amd/, backend/targets.om became gpu/targets.om, tests/amd-exec/*-probe.om became gpu/amd/tests/amd-exec/.

The gate

tests/gates/run.sh gpu-amd

That builds gpu/amd/gate.om (with seed/ng/sha256.om) using seed/out/omc and runs it. The gate, in Omega:

  1. refuses any compiler whose sha256 is not the one in seed/out/omc.sha256 (exit 69, nothing built);
  2. builds every unit (the writer, the loader table, the executor, rope, the four KFD units, the launcher for AArch64 and x86-64, the five probes) twice and requires exit 0, empty stderr and identical bytes;
  3. checks the bytes in card.tsv against the sha256 their receipts record: the 18 model kernel objects, vadd.hsaco and the x86-64 launcher, which ran on the MI300X, and the AArch64 launcher, a host-built reference that never ran on the card (printed as reference); each object must also pass targets load AMDGPU_HSACO FILE gfx942;
  4. runs three controls that must be caught: a compiler one byte longer, a kernel table with one descriptor word changed, a missing table.

It ends with OMEGA-GPU-AMD PASS ... hardware=NOT_RUN. It opens no device.

What ran on hardware

The receipt for the MI300X run stays in CUDApp where it was written: evidence/amd-qwen38-native-refusal-20261113/ (Qwen3.8-27B-FP8 through the direct-KFD launcher on an x86-64 host). Its native/MANIFEST.json records the x86-64 launcher (omega-launch), vadd.hsaco and the 18 model kernel objects. Those results carry over to this code only through byte identity, which the gate checks for each of them. The AArch64 launcher never ran on the card.

Not yet Omega (still in CUDApp)

The files of CUDApp's AMD back end that are not Omega, and what became of each, are listed in NOT-YET-OMEGA.tsv, generated by rest/classify.om from rest/classes.tsv over the CUDApp tree it names (rest/README.md gives the command). Its class column says, for each file: (a) its behaviour is rewritten in Omega and checked by rest/gate.om against tables the file recorded, (b) it stays in CUDApp as an oracle or instrument, or (c) it is obsolete (the launcher's own compiler pin: under ADR 0047 Decision 4 a moved piece carries no pin of its own; the gates use seed/out/omc.sha256). The old files stay in CUDApp as the oracles that recorded the tables.

What rest/gate.om does not replay (cases that need CUDApp's instruments, and every hardware row) is listed in its tables as notrun rows and printed as NOT_RUN; those checks run only in CUDApp.