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/gpu/amd/rest/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 / gpu / amd / rest / README.md` 48 lines ยท 3357 bytes Raw Blame History Rendered 1 # gpu/amd/rest: checks of the AMD leftovers, in Omega 2 3 This directory is one slice of the AMD gfx942 back end: the checks that CUDApp (main 4 `84b524cadaaa8bc9b556adfaea9d6dd2e0d67a66`) ran in C, Python, shell and assembly, written in Omega. `gate.om` 5 replays them against tables recorded from those old checkers. The old files stay in CUDApp as the oracles 6 that recorded the tables. 7 8 | part | old checker | table | 9 |---|---|---| 10 | 1 | `backend/amd/gfx942/*.s` with llvm-mc 18.1.3 | `llvm18-sections.tsv` | 11 | 2 | `tests/amd-kfd-launch/check.py` | `launch-verdicts.tsv` | 12 | 3 | `tests/amd/*.py`, `tests/amd/run.sh` | `writer-verdicts.tsv` | 13 | 5 | `tests/amd-kfd/oracle.py`, `tests/amd-kfd/run.sh` | `kfd-verdicts.tsv` | 14 | 6 | `tests/amd-kfd-launch/plan-check.py` (CPU cases) | `plan-verdicts.tsv` | 15 16 What the gate checks, per table: it builds the Omega units each table names with this repository's 17 `seed/out/omc`, compares the bytes and hashes the rows record (sections, objects, input files, unit 18 texts), runs each `run` row's command on the Omega-built binaries and compares its exit status, stdout and 19 stderr with what the old checker saw. Each header of a table says what its row kinds mean. Every case of 20 `check.py` and `plan-check.py` is either replayed or listed as a `notrun` row with its reason (a case 21 that needs the ptrace instrument `trace.c`, another CUDApp instrument such as `aql-oracle`, 22 `publication`, `cc` or `python3`, or a child with descriptor 2 closed); a `notrun` row prints NOT_RUN and 23 is counted in `not_run=`. Only the compiles of the unit binaries and the `hsaco` builds of the `obj` 24 rows have no row, because the gate does those itself. Hardware rows are NOT_RUN on every host. 25 26 The `guard` row of `kfd-verdicts.tsv` is not an oracle verdict: it is written by hand in `tables.py` and 27 states the gate's own control (records.om without its index guard must not refuse that index). 28 29 The tables were generated outside this tree by the lane's oracle scripts `tables.py` (with `sections.py` and 30 `plan-keep.py`) from the old checkers' outputs. Those scripts and every input they read are kept outside the 31 repository by the lane, identified by sha256: `tables.py` 32 `743733a4a260dd22263cc848a0e5eccf5d199ff27a95740610f110a28d526d79`, `sections.py` 33 `a7ba7e6a4e856973a0eec91a80216cd215a5953af3e41fee11482a26e6010b44`, `plan-keep.py` 34 `87b60ac43b437df63ac7f15583ef71d6bc0c37ce2246688edeb73a09a6216caf`, and the `SHA256SUMS` list of every 35 file kept, `2333d37fbd7ccec4f6bc46be459954d41d07b14a0013c5614975adefc5306a01`. 36 37 Run: `tests/gates/run.sh gpu-amd-rest` (or build by hand: 38 `{ printf 'om2\n'; cat seed/ng/sha256.om gpu/amd/rest/gate.om; } | seed/out/omc > gate; ./gate seed/out/omc SCRATCH`, 39 SCRATCH must not exist). The x86-64 launcher rows run under `/usr/bin/qemu-x86_64`. Without it, or on a 40 host where `/dev/kfd` exists (the launcher and plan rows would open the device), the gate prints 41 `OMEGA-GPU-AMD-REST NOT_RUN reason=...` and exits 3. 42 43 `classify.om` with `classes.tsv` generates `gpu/amd/NOT-YET-OMEGA.tsv`, the class of every leftover file: 44 (a) behaviour rewritten here, (b) kept in CUDApp as an oracle or instrument, (c) obsolete. An AMD path that 45 no rule covers is an error (exit 1): 46 47 git -C CUDApp ls-tree -r --name-only `84b524cadaaa8bc9b556adfaea9d6dd2e0d67a66` \ 48 | classify gpu/amd/rest/classes.tsv > gpu/amd/NOT-YET-OMEGA.tsv