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/tools/board.py # 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 / tools / board.py` 126 lines ยท 7367 bytes Raw Blame History 1 #!/usr/bin/env python3 2 # tools/board.py -- build the static leaderboard (site/index.html, site/receipts.json) from receipts/*.json. 3 # Only receipts that pass tools/validate.py are shown; the page states how many were left out. 4 # board.py [OUT_DIR] (default: site) 5 # INTERIM host glue (Python); Omega successor: the page generated by an omc-built program, the way 6 # aienos.com pages are rendered from seeded Omega (skill render-page-from-omega). 7 import glob, html, json, os, sys 8 9 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 10 sys.path.insert(0, os.path.join(ROOT, "tools")) 11 import receipt as R # noqa: E402 12 import validate as V # noqa: E402 13 14 BLOB = "https://github.com/%s/blob/main/" % R.REPO 15 CMD = "git clone https://github.com/%s && cd omega-gpu-bench && ./run" % R.REPO 16 E = html.escape 17 18 19 def best(rec): 20 rates = [r["gbps"] for r in rec["results"] if r["verdict"] == "PASS" and r["gbps"]] 21 return max(rates) if rates else None 22 23 24 def kernels(rec): 25 cells = [] 26 for r in rec["results"]: 27 ok = r["verdict"] in ("PASS", "NEG_DETECTED") 28 sm = r["cubin"].split("_")[1] 29 cells.append('%s %s %s' % ( 30 "ok" if ok else "bad", E(r["error"] or "%s of %s words differ" % (r["mismatches"], r["checked"])), 31 E(r["kind"]), E(sm), E(r["verdict"]))) 32 return " ".join(cells) 33 34 35 def main(): 36 out = sys.argv[1] if len(sys.argv) > 1 else os.path.join(ROOT, "site") 37 c = V.Checker(ROOT, os.path.join(ROOT, "kernels", "SHA256SUMS"), 38 os.path.join(ROOT, "receipts", "imports.sha256"), False) 39 good, rejected = [], [] 40 for path in sorted(glob.glob(os.path.join(ROOT, "receipts", "*.json"))): 41 try: 42 rec = json.load(open(path)) 43 errs = c.check(rec) 44 except ValueError as x: 45 errs = [str(x)] 46 (rejected if errs else good).append((os.path.relpath(path, ROOT), rec if not errs else None)) 47 ran = [(p, r) for p, r in good if r["results"]] 48 ran.sort(key=lambda pr: (pr[1]["origin"] != "kit-run", -(best(pr[1]) or 0), pr[1]["run"]["utc"])) 49 rows = [] 50 for i, (p, r) in enumerate(ran, 1): 51 m, g = r["machine"], best(r) 52 origin = ("kit run, self-reported" if r["origin"] == "kit-run" 53 else "imported CloudKernels run (before the kit)") 54 rows.append("%d%s
sm_%s%s
CUDA driver API %s" 55 "%s%s%s%s%s%s" % ( 56 i, E(m["gpu"]), E(m["cc"].replace(".", "")), E(m["driver_version"] or "?"), 57 E(str(m["cuda_driver_api"])), E(r["provider"]), E(origin), kernels(r), 58 ("%.1f GB/s
%.3f ms per launch" % ( 59 g, min(x["kernel_ms"] for x in r["results"] if x["gbps"] == g)) if g else "not timed"), 60 E(r["run"]["utc"][:10]), E(BLOB + p), E(r["receipt_sha256"][:12]))) 61 waiting = ["
  • %s (sm_%s), driver %s: %s
  • " % (E(r["machine"]["gpu"]), E(r["machine"]["cc"].replace(".", "")), 62 E(r["machine"]["driver_version"] or "?"), E(r["not_run"])) 63 for p, r in good if not r["results"]] 64 page = TEMPLATE.format( 65 cmd=E(CMD), repo=E(R.REPO), path=E(R.PATH_LABEL), rows="\n".join(rows) or 66 'No receipts yet.', 67 waiting=("

    Cards without a kernel yet

    " % "".join(waiting)) if waiting else "", 68 nvalid=len(good), nrej=len(rejected)) 69 os.makedirs(out, exist_ok=True) 70 with open(os.path.join(out, "index.html"), "w") as f: 71 f.write(page) 72 with open(os.path.join(out, "receipts.json"), "w") as f: 73 json.dump([r for _, r in good], f, indent=1, sort_keys=True) 74 print("board: %d receipts shown, %d rejected -> %s" % (len(good), len(rejected), out)) 75 for p, _ in rejected: 76 print(" rejected " + p) 77 78 79 TEMPLATE = """ 80 81 Omega GPU bench: bring your own NVIDIA GPU 82 92

    Omega GPU bench

    93

    Run kernels whose machine code was written by Omega on your own NVIDIA GPU, check every output word 94 against a CPU reference, and put your card on this board. You need an NVIDIA driver, Python 3 and git. 95 No CUDA toolkit, no compiler, no pip install.

    96

    Kernels withdrawn. The six v7 cubins and the cubin writer that produced them were 97 removed pending clean-room rewrite (CudaLicenseRisk Q6). Until it lands, ./run reports NOT_RUN 98 on every GPU and writes no receipt. The rows below are kept unchanged as historical records; the kernels they 99 hash are withdrawn, and no new run of them is accepted.

    100
    {cmd}
    101

    Once the kit ships kernels again, it writes a receipt under receipts/. Open a pull request 102 with it to github.com/{repo}; CI checks it and, once merged, it shows 103 up here.

    104

    What runs where. The withdrawn kernels were SASS assembled by Omega's asm2 105 from a hand-written listing and wrapped into a cubin. They reached the GPU through {path}. Receipts are 106 self-reported: CI checks the kernel hashes, counts, verdicts, every reported reference value (recomputed from 107 the public seed), the output hash of a clean run, and the GB/s arithmetic, but nobody re-ran your GPU. The 108 three seed rows are my own rentals on vast through OpenResearch on 2026-10-26, run before this kit existed; 109 they were not timed.

    110

    Board

    111 112 113 114 {rows} 115
    #GPUDriverWhereOriginKernelsvecadd speed (226 words)DateReceipt
    116

    vecadd: c[i] = a[i] + b[i] on 220 + 7 words, every word compared. neg: the same kernel with one 117 register changed, which must be caught (NEG_DETECTED). Speed: median of 5 rounds of 20 launches timed with CUDA 118 events, 12 bytes moved per word. {nvalid} receipts shown, {nrej} rejected by the validator.

    119 {waiting} 120

    Source, rules and validator: github.com/{repo}. 121 Machine-readable: receipts.json.

    122 123 """ 124 125 if __name__ == "__main__": 126 main()