interplane.Get Omega
Read in your language

benchmarks-mv

Measurement harnesses and evidence bundles for AIEN on the NVIDIA DGX Spark GB10. Speed is reported against the machine's physical limit and my own previous run. Attachment of AienOS.

Brought by drakestapleton

branch main Branches Tags History

benchmarks-mv / prime-drag-race / CAMPAIGN-2026-10-05.md

143 lines · 10086 bytes Raw Blame History Rendered
1# Prime Drag Race optimization campaign, 2026-10-05
2
3Note of 2026-10-15: the CUDA mirror entry was withdrawn from this record under AIEN's rule that we never
4compare ourselves with other people's systems: speed is measured against the machine's physical limit,
5and correctness against our own reference. Its rows stay in git history. The sealed run receipts under
6`evidence/` still hold the withdrawn CUDA runs, because each receipt is named by its own digest and cannot be edited.
7
8The record in `RESULTS-2026-10-05.md` is frozen and is not changed here. This file reports each
9optimization step of the native GB10 implementation against that frozen baseline, one variable per
10step, with correctness re-proved on the chip before every timed run.
11
12Frozen baseline: receipt `0947ba62` (omega `c7086da`, runner `d66cd2a`), limit 1,000,000, 10 trials of at
13least 5 s each, medians in passes per second:
14
15| cpu-c-base | gb10-native |
16|---:|---:|
17| 2069.43 | **971.48** |
18
19Claim tags: OBSERVED (measured, receipt cited), DOCUMENTED (quoted source), INFERRED (reasoned, with
20confidence), UNKNOWN.
21
22## Result
23
24On the DGX Spark under Linux, AIEN's native GPU prime sieve ran 20.3x faster end to end than the frozen
25native baseline, with correctness checked against our own reference on the chip.
26
27Same-session run with the best native configuration (receipt `1a3eafe9`, omega `c505e7f`,
28128-CTA budget, 2000 us marker spin; CPU program unchanged from the frozen run):
29
30| cpu-c-base | gb10-native |
31|---:|---:|
32| 2068.37 | **19701.34** |
33
34OBSERVED: gb10-native is 20.3x the frozen 971.48 and 9.5x the CPU base (native sd 100.7). All
35verdicts in the receipt are PASS (5-pass audits, warmup, 10 trials per implementation).
36
37## Steps (each against the frozen baseline; A-B-A or A-B-C-A order inside one quiet window)
38
39| Step | One change | Timed medians (passes/s) | Effect | Receipts |
40|---|---|---|---|---|
41| C1 | CTA budget setting (`PR_GB10_CTA_BUDGET`), default 64 unchanged | 966.32 @64, 1605.09 @128, 965.69 @64 | 1.66x | `d929e3cc`, `159dd3fd`, `7dd501e3` |
42| C2a | Three table loads issued together, one wait (`ld_group`) | 966.29 old, 1207.15 new, 967.97 old; 1939.78 new @128 | 1.25x @64 | `8c8c2a9b`, `6a6e6766`, `7ad7eeec`, `c680704c` |
43| C3 | Prime table staged in shared memory | 1210.46 C2a, 1082.09 C3, 1209.58 C2a; 1914.68 C3 @128 | **0.89x (slower)** | `15310126`, `bdea5434`, `c1c17c02`, `fa0577a3` |
44| C4 | Marker wait spins up to 2000 us before the 50 us sleep-poll | 1083.28 off, 1145.92 on, 1079.75 off; 2034.94 on @128 | 1.06x @64 | `93436c5e`, `c3ba5638`, `0de6873f`, `29817dce` |
45| C2b | Mesa NAK-derived fixed-latency scheduling (by GPT-6 Astra) | 1146.63 base, 1169.77 sched | 1.02x @64 | `57394a4e`, `df51af20` |
46| C5 | Sieve mark loop with a warp-uniform trip count | 9138.76 @64, 1145.70 base; 19704.31 @128 | **7.81x @64** | `25caf969`, `4173eef3`, `20e469ea` |
47| C7 | Staged table on or off (`PR_GB10_TABLE` auto vs global), one binary, after C5 | 9181.66 auto, 11364.76 global, 9122.05 auto, 11333.47 global @64; 19718.99 auto, 17012.24 global, 19665.75 auto @128 | **shared 0.81x @64, 1.16x @128** | `a9528fc7`, `e984949b`, `8e4dd91e`, `f8bfeff1`, `2c0b0912`, `c294fb88`, `b00ddaa8` |
48
49All CTA counts above are budgets; a budget of 128 gives a grid of 123 at this limit. C2b and C5 legs all
50use the C4 spin. C7 used omega `9dee7b1` (C5 code plus the table switch, default unchanged).
51Full receipts: `evidence/2026-10-05-campaign/c1` to `c7`.
52
53Correctness before every timed run (OBSERVED, `verify/` per step): runner verify sweep (638 limits, 3
54audit passes, tiny sizes and partition edges) at budgets 64 and 128; big limits 999,999 to 2^24 + 1 at
55budgets 64 and 1024; from C3 on also 127,667,399 to 127,667,402, where the shared-memory table stops
56fitting. The mutant build (one correction dropped) was caught on the bitmap at budgets 64 and 1024 in
57every window from C2 on. C1's mutant control was invalid (rejected on its name, not its bitmap) and was
58redone in C2.
59
60## Causes
61
62- **Lane divergence was the main cost (C5).** INFERRED, high confidence, from the A/B: the old mark loop
63 ran `while j < 32`, a branch whose trip count differs per lane, and the emitter places no reconvergence
64 point. Making the trip count depend only on the prime (the same for every active lane) gave 7.81x with
65 nothing else changed. GPT-6 Astra's cycle model predicted this before the run: the fixed-stall critical
66 path is about 30 to 60 us per launch, far below the measured 821 us, while fully serialized lanes land
67 near the measured times (`astra/REPORT.md`).
68- **Not enough parallel work (C1).** OBSERVED: 1.79x lower kernel time for 1.92x more threads. The I42
69 64-CTA cap did not reproduce up to 1024 CTAs.
70- **Host wait, not the chip, made the launch floor (C4).** OBSERVED in the diagnostic tool: an empty
71 launch took 103 us with the sleep-poll and 6 us with the spin. Run-to-run spread also fell about 10x.
72- **Fixed stall counts are not the bottleneck (C2b).** OBSERVED 1.02x, as Astra's model predicted.
73- **Table loads were not the bottleneck (C3).** OBSERVED: shared memory made it slower. This refuted the
74 earlier inference from C2a. The cause of C3's extra ~97 us per launch at 64 CTAs is UNKNOWN; a changed
75 shared-memory carveout is ruled out (QMD min/max/target unchanged, DOCUMENTED in Astra's report).
76- **The best table placement depends on the launch configuration (C7).** OBSERVED, one binary, only the
77 table mode changed, A-B-A-B at 64 CTAs and A-B-A at 128: global wins by about 24% at 64 CTAs, shared
78 wins by about 16% at 128. The shared table wins at the measured best configuration, so it stays the
79 default. The mechanism is UNKNOWN; L2 contention among 123 CTAs reading the global table is a
80 hypothesis (INFERRED, low), left as follow-up research.
81
82## General FORGE/Omega wins vs sieve-only
83
84General (shared Omega GPU code; coverage limited to what was tested):
85- C4 marker spin in the GPU session: about 97 us less per launch in the launch-cost tool (OBSERVED).
86 Any short kernel that waits on the marker should gain the same (INFERRED); other workloads are not
87 measured.
88- C2b NAK-derived scheduling for every elementwise family, plus a fixed-RAW hazard checker. It passed
89 all 31 existing elementwise kernel checks on the chip (OBSERVED). Speed effects on other Omega
90 workloads are not measured. Predicate guard delay is now 14, the reference value, up from 13.
91- C2a `ld_group` and the scoreboard hazard checker; C3's QMD shared-memory size support and the
92 simulator's barrier and race model; the C1 finding that 1024-CTA launches work.
93- The C5 lesson: the emitter has no reconvergence point, and lanes that take different paths can cost
94 about 8x here. The general fix is structured reconvergence in the code generator, preserving program
95 behavior, not a hand rewrite of every such loop. Filed as aien-spark/omega#308, with this sieve's
96 original loop as a regression case beside other loop shapes (if/else, lane-dependent break, nesting,
97 early exit before a barrier or shuffle). The attention kernel already hit the correctness side of the
98 same gap on 2026-10-04.
99
100Sieve-only: the C5 loop rewrite itself, the C3 staged kernel (default at limits up to 127,667,400;
101after C5 it is the measured winner at 128 CTAs and the loser at 64, see C7), and the CTA budget value
102for this grid.
103
104## Limits
105
106- Linux-hosted GB10, not AIENOS. One workload, one limit.
107- The native GPU path is now launch-bound: about 45 us submit-to-marker per pass.
108- C1 receipts carry the label `c7086da` on a binary that contains the `dea8b5c` code (stale-label build
109 bug, fixed in omega `0dc96dc`; the strings differ only in the label). Every later step's labels are
110 exact.
111- Omega PR #307 (stacked on #303) holds the code. Nothing here is merged by this session.
112
113## Post-merge check (omega main `2041f24`, 2026-10-06)
114
115Omega #303, #307 and #310 (structured reconvergence, #308) were merged by the merging session after the
116CAND-3 freeze, rebased onto main with content identical to the measured branch heads. One sanity pass on
117the combined main `2041f24`, under a quiet hold: build plus host checks (172/172 sieve host checks,
11824/24 elementwise host checks), runner verify sweep at 128 CTAs, big limits at 1024 CTAs, mutant caught,
119the 31-check elementwise chip gate, and one short timed run (5 trials, same settings as the best-configuration run).
120
121OBSERVED: median **19761.74** passes/s against the screen of 0.95 x 19701.34 = 18716 (receipt
122`3dda5591`, executable SHA-256 `3a2719ab...`, all 8 verdicts PASS). No regression after integration.
123This is a screen only; the campaign result stays on the same-session receipt `1a3eafe9`.
124Evidence: `evidence/2026-10-05-campaign/postmerge-2041f24/`.
125
126## Integration
127
128Every measured revision is preserved as a tag so squash merges and branch deletion cannot lose it:
129omega `prime-race/measured-<short>` for c7086da (frozen), dea8b5c, 0dc96dc, 75c43c2, d6632db, 028f69c,
130888a011, c505e7f (best configuration) and 9dee7b1 (C7); this repo `prime-race/measured-runner-d66cd2a`.
131
132Merge order (the merging session does this): retarget omega #307 to main, merge #303, rebase #307 and
133merge it; the same for #15 over #14 here; aien-architecture #140 in any order.
134After #307 is on omega main, the combined code is rebuilt, host-tested, verify-swept and given one
135short timed run at the recorded settings, compared against receipt `1a3eafe9`.
136The short run only screens for an obvious regression; the campaign result rests on the repeated
137same-session receipt `1a3eafe9`. The post-merge check writes a new receipt that records the
138merge revision and the SHA-256 of each executable.
139
140Automated checks at hand-off: omega #307 at `9dee7b1` has 29 passed and 8 skipped. Six skipped jobs
141(turing, brownian, polyglot, algebra, path, argus) run only when a change touches their own paths, which
142this one does not; `test-numeric-transc-full` is too long for a hosted runner (every 32-bit input, twice);
143`test-m17` needs the GB10 chip. This repository (benchmarks) has no automated checks configured.