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 / docs / perf / DECODE_GRAPH_RECEIPT.md

133 lines · 8860 bytes Raw Blame History Source

Decode-graph performance receipt (omega-decode-graph-receipt/1)

Lane P1 of aien-architecture#233. tools/dgraph_receipt.c turns one existing run of the decode-graph chip test into one machine-readable receipt bound to the commit that was measured, and checks such receipts. It reads files only: no GPU, no libomega_gpu, no new counters. This change does not touch GPU numerics, barriers, prefetch, submission, memory ownership or any hot path: it only reads the numbers that omega_gpu_decode_graph and gpu_decode_graph_test already produce.

Where the numbers come from

receipt fieldsourceclock
per_token.graph.launchesOmegaGpuDecodeGraphStats.launches: "launches recorded for the token"count
per_token.graph.submits.submits: "submissions (1 normally; = launches with flush_each)"count
per_token.graph.chip_ns.chip_ns: "sum of the list submissions' first-submit-to-last-marker time"host
per_token.graph.record_ns.record_ns: "host: begin_token to the submit (recording)"host
per_token.graph.total_ns.total_ns: "host: begin_token to end_token return"host
per_token.graph.sems_done.sems_done: "launch semaphores found DONE" (not written by the test: null + note)count
per_token.graph.host_overhead_nsderived: total_ns - chip_nshost
stamped_token.span_ns, stages[].device_nsomega_gpu_decode_graph_stamps(): "Launch i took stamps[i + 1] - stamps[i] ns"device (PTIMER)
stamped_token.chip_nsthe stamped token's .chip_nshost
stamped_token.unattributed_nsderived: chip_ns - span_nshost minus device
per_token.flush_each.*the same list submitted one launch per submission (TEST ONLY set_flush_each)as above

Quotes are from src/omega_gpu_decode_graph.h. The stats are copied from the --out JSON of tests/gpu_decode_graph_test.c; the run's barrier, prefetch and cached-weights settings from its log ("dgraph prefetch" and "fp8 knobs" lines); commit, dirty flag, host and GPU from the runner's device.txt; binary identity from binaries.sha256.

Host clock vs device clock

Serial vs overlapping time

Statuses

VERIFIED | EXPERIMENTAL | HISTORICAL | NOT_RUN | FAIL | SUPERSEDED. Receipts rebuilt from old evidence logs are HISTORICAL: the chip was not run to make them. VERIFIED needs a clean tree and a PASS run. EXPERIMENTAL needs a PASS run. Neither is allowed with hardware.gpu none_detected (what the generator writes when nvidia-smi found no GPU). NOT_RUN carries per_token: null, stamped_token: null and a not_run_reason, so it holds no numbers.

Making a receipt from a run

From the repo root, after make dgraph-receipt:

build/dgraph_receipt/dgraph_receipt \
  --run-dir evidence/OWN30B-REQUAL-MAIN-710d438c-20261015/gates/decode_graph \
  --stats   evidence/OWN30B-REQUAL-MAIN-710d438c-20261015/gates/decode_graph/receipt-main.json \
  --log     evidence/OWN30B-REQUAL-MAIN-710d438c-20261015/gates/decode_graph/main.log \
  --status HISTORICAL --repo aien-spark/omega \
  --model "synthetic Qwen3-30B-A3B-shaped decode step, random weights" \
  --precision "FP8 e4m3 weights (qkv, o, gate_up, down), BF16 lm_head, f32 activations" \
  --mode "decode, one token per command list (omega_gpu_decode_graph_token), batch 1" \
  --runner "tools/run_gpu_decode_graph_chip.sh EVIDENCE_DIR main" \
  --out receipt.json
build/dgraph_receipt/dgraph_receipt --check receipt.json --evidence-root .

The generator runs the checker on its own output first and refuses to write a receipt the checker rejects. It also refuses a log that lacks the run's settings and a stats file and log from different runs. The exact commands behind the golden fixtures are in tests/dgraph_receipt/run.sh.

What the checker rejects

Missing fields, wrong types, unknown top-level fields, a schema other than /1, a status outside the enum, a commit that is not 40 lowercase hex digits, a non-OWNER/NAME repo, placeholder strings anywhere ("", TBD, unknown, TODO, N/A, none, ...), zero tokens, derived numbers that do not match their inputs (host_overhead_ns, unattributed_ns, stage_sum_ns), stages that do not add up to span_ns or whose sums overflow 64 bits, span_ns > chip_ns, sems_done neither equal to launches nor null with a note, VERIFIED on a dirty tree, VERIFIED or EXPERIMENTAL with no detected GPU, measurements on a NOT_RUN receipt, absolute or .. evidence paths, and, with --evidence-root, evidence paths that do not exist. make test-dgraph-receipt proves each rule with a fixture in tests/dgraph_receipt/fixtures/ (table: tests/dgraph_receipt/negatives.txt).

Reproduced numbers (HISTORICAL)

These are the only numbers here. They are copies of existing evidence, not new claims:

Limitations

Gaps (counters that do not exist; none added here)