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-gpu-bench/blob/main/README.md
# omega-gpu-bench
First-party Omega GPU kernel benchmark harness and receipts
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`omega-gpu-bench / README.md`
115 lines ยท 6581 bytes Raw Blame History Rendered
1 # omega-gpu-bench
2
3 Run GPU kernels whose machine code was written by Omega on **your own NVIDIA GPU**, check every output
4 word against a CPU reference, and put your card on the board:
5
6
7 ```sh
8 git clone https://github.com/aien-dev/omega-gpu-bench && cd omega-gpu-bench && ./run
9 ```
10
11 You need Linux, an NVIDIA driver (`libcuda.so.1`), Python 3.8 or newer, and git. No CUDA toolkit, no
12 compiler, no `pip install`, no root.
13
14 ## Kernels withdrawn
15
16 The six v7 cubins (vecadd and neg for sm_80, sm_86 and sm_89) and the cubin writer that produced them
17 (`kernels/src/cubin.om`, driven by `kernels/src/build.sh`) were **removed pending clean-room rewrite
18 (CudaLicenseRisk Q6)**. Until a cubin writer built only from public sources lands, `./run` reports
19 `NOT_RUN` on every GPU with that reason, touches no GPU and writes no receipt. The removed files remain
20 in this repository's git history; purging them from history is a separate decision that has not been
21 made. Their hashes are kept in `kernels/WITHDRAWN.sha256` (see "The seed rows").
22
23 ## What runs where
24
25 | Piece | What it is |
26 | --- | --- |
27 | Kernels (`kernels/*.cubin`) | None at present (see "Kernels withdrawn"). The SASS listings `kernels/src/*.cuda.s2` for Omega's `asm2` remain; the cubin writer is to be rewritten from public sources. |
28 | Path to the GPU | **NVIDIA's own driver library**, libcuda (`cuModuleLoadData`, `cuLaunchKernel`). This kit uses it as an interop oracle for Omega's encoder and cubin writer. It is not CUDA++'s own user-space driver path. |
29 | Kit (`./run`, `kit/*.py`) | Interim Python glue that loads the cubins through ctypes, checks the output and writes the receipt. Its Omega successor is listed in [DEPENDENCIES.md](DEPENDENCIES.md). |
30 | Receipts | Self-reported. CI checks everything it can from public inputs (below), but it cannot re-run your GPU. |
31
32 When the kit ships kernels, it runs every kernel your card can load: an sm_89 card (RTX 40, L4, L40)
33 runs the sm_89, sm_86 and sm_80 builds, an sm_86 card (RTX 30, A10, A40) runs sm_86 and sm_80, an sm_80
34 card (A100, A30) runs sm_80. Other architectures get a receipt that says `not_run`: this kit has no kernel
35 for them yet.
36
37 Each GPU runs two kernels per architecture (this is what the withdrawn kernels did):
38
39 - **vecadd**: `c[i] = a[i] + b[i]` on 2^20 + 7 32-bit words from a fixed seed; every word is compared.
40 Then it is timed on 2^26 words: median of 5 rounds of 20 launches, timed with CUDA events,
41 12 bytes moved per word.
42 - **neg**: the same kernel with one register operand changed. Its output must be wrong
43 (`NEG_DETECTED`). If it came out right, the check could not fail, and the run says `NEG_MISSED`.
44
45 ## Submit your receipt
46
47 ```sh
48 python3 tools/validate.py receipts/.json
49 ```
50
51 Then fork this repository, commit the receipt with `git commit -s` (the `Signed-off-by` line must equal the
52 receipt's `signed_off_by`), push, and open a pull request. `./run` prints the exact commands.
53 `--sign-off "Name "` sets the name; the default is your git identity. `--provider` says where the
54 GPU is (default `self-hosted`; e.g. `--provider "vast"` for a rented card).
55
56 ## What CI checks
57
58 `tools/validate.py` rejects a receipt when:
59
60 - it was edited after `./run` wrote it (the `receipt_sha256` covers every field);
61 - a kernel hash differs from `kernels/SHA256SUMS` at the kit commit named in the receipt, that commit is
62 not on `main`, or the kit had local changes;
63 - it is a kit run of a withdrawn kernel (a hash in `kernels/WITHDRAWN.sha256`), from any kit commit;
64 - it leaves out a kernel the GPU can load, or lists one it cannot;
65 - a count is not 2^20 + 7, or a verdict disagrees with its mismatch count;
66 - any reported reference value differs from the one recomputed from the public seed, or a "wrong"
67 value equals the reference;
68 - a clean run's output hash is not the reference output's hash, or a failing run's is;
69 - the GB/s does not follow from the kernel time, or the libcuda label is missing;
70 - it was made with the test fixture driver.
71
72 `tools/pr_gate.py` (run from `main`, never from the pull request) also keeps receipts append-only and
73 checks the sign-off. `tests/run.sh` proves each of these rules can fail: it runs a fixture kit (placeholder
74 kernel files, not cubins) against a fake driver, tampers with the result fifteen ways, and requires every
75 tampered receipt to be rejected. It also checks that the shipped kit says `NOT_RUN` and that a run made
76 with the last kit that shipped the withdrawn kernels is rejected.
77
78 ## The seed rows
79
80 The first three rows on the board are my own runs on GPUs rented from vast through OpenResearch on
81 2026-10-26, before this kit existed: an RTX 4090, an A100 PCIe 40GB and an RTX 3090. They went through
82 the same libcuda path with the same cubins (`origin: cloudkernels-import`, allowlisted in
83 `receipts/imports.sha256`, raw output in `evidence/cloudkernels/`). That harness did not hash the output
84 or time the kernel, so those rows say "not timed". They are kept unchanged as historical records. The
85 kernels they hash were withdrawn pending a clean-room rewrite (see "Kernels withdrawn"); the validator
86 checks imported rows against `kernels/WITHDRAWN.sha256`, and no new run of those kernels is accepted.
87
88 ## Rebuilding the kernels
89
90 NOT_RUN: the cubin writer and its build script were withdrawn (see "Kernels withdrawn"), so there is
91 nothing to rebuild until the clean-room rewrite lands.
92
93 ## Tests
94
95 ```sh
96 sh tests/run.sh
97 ```
98
99 No GPU needed. Licensed under Apache-2.0 with the LLVM exception ([LICENSE](LICENSE), [NOTICE](NOTICE)).
100
101 ## Connected repos
102
103 - [aien-dev/openaccel-lab](https://github.com/aien-dev/openaccel-lab): the cross-backend conformance and performance lab (OpenCL, Triton, HIP, CUDA, Omega) that imports this repository's receipts unchanged under `receipts/imported/`, pinned at ``be6e65ac``.
104
105 ## Human-Directed Agentic Engineering
106
107 I follow Human-Directed Agentic Engineering (HDAE) in development: I define goals,
108 architecture, constraints, acceptance criteria, and stopping points; agents implement,
109 execute checks, diagnose failures, and revise within those boundaries. I retain
110 responsibility for reviewing claims, accepting changes, and release decisions.
111 This development method does not turn a self-reported receipt into hardware qualification.
112
113 For the documented method and a systems-software case study, see Gregory M. Kurtzer,
114 [*Ginux: Building an Independent Kernel That Runs Linux Userspace through
115 Human-Directed Agentic Engineering* (2026)](https://doi.org/10.5281/zenodo.`23682548`).