Speed program: ledger V3b/V4a/V4 section deltas from the CE/CN/CT windows (spd-sqw)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-11-09 20:13:02 +01:00
co-authored by Claude Sonnet 5.5
parent 4f310457ce
commit 4c8919610a
+3 -3
View File
@@ -77,7 +77,7 @@ Structure first, then the layer steps in graph order: embed (R7), mixer half (V3
| R7 | first doorbell after graph start (embed, first layer mixer) | 0.132 | 0.117 | +0.015 | CUPTI | device | open |
| V3 | mixer phase (`add_hits` end to next doorbell) | 6.366 | 5.963 | +0.403 | CUPTI | device | fixing |
| V3a | GDN gates and gate projection on side streams (`LELEKA_SM120_SIDE_MIXER=1`, existing, off) | mixer 5.913, round 17.508 (`CM.1`) | mixer 5.963 | section delta mixer -0.453, round -0.356; mixer phase now equal to VANL | CUPTI | device | fixing (A/B `ab-sm` done: decode tok/s +1.39 %, CI +0.46..+2.32 %, n=10, 27 req/block; ms/round -0.18, CI -3.79..+2.00 %; identity `spd-sqid1` P2 PASS: 2057 top-16 logprob rows bit-identical, 0 argmax flips, draft trace 518/518 identical; live out_sha unusable; default ON in the three 5090 profiles; fixed after the group e2e A/B) |
| V3b | QSA indexer chain and query chain on side streams (`LELEKA_SM120_SIDE_QSA`, code `0c30105d4`, off) | in line | 0.509 ms of overlap with the main stream (main+qsa) | not yet measured; VANL mixer phase is already matched by V3a | CUPTI (VANL) | device | fixing (identity `spd-sqid1` P3 PASS: 2057 rows bit-identical, draft trace 518/518; window `spd-sqw` running, A/B `spd-sqn` queued; off by default) |
| V3b | QSA indexer chain and query chain on side streams (`LELEKA_SM120_SIDE_QSA`, code `0c30105d4`, off) | in line | 0.509 ms of overlap with the main stream (main+qsa) | section delta (`CN.1` against `CL.1`, same replay window r29): mixer phase of a QSA layer 184.5 -> 169.7 us p50 (-14.8 us x 12 = -0.18 ms/round); `CT.1` (all three) 169.2 us. FFN phase rose in `CN.1` on GDN layers too (109 -> 131 us), which the branch does not touch, so the whole-graph time of that window (14.62 against 13.56 ms mean) is window drift, not the branch; the A/B decides | CUPTI (VANL) | device | fixing (identity `spd-sqid1` P3 PASS: 2057 rows bit-identical, draft trace 518/518; A/B `spd-sqn` queued; off by default) |
| K6 | attention role in total (norm/RoPE, appends, scores, top-k, resolve, chunk, merge, gate) | 1.357 | 1.125 | +0.232 | CUPTI role table | device | open |
| K1 | attention decode chunk (`leleka_qsa_decode_chunk_daily` 18.3 us, 12 per graph) against `attn_chunk_kernel_pre75` (17.1 us) | 0.220 | 0.206 | +0.014 | CUPTI | device | open |
| K2 | indexer block scores (`leleka_qsa_decode_scores` 14.2 us against `block_scores_multi` 17.1 us) | 0.170 | 0.205 | -0.035 | CUPTI | device | proved-equal (LEL ahead) |
@@ -93,8 +93,8 @@ Structure first, then the layer steps in graph order: embed (R7), mixer half (V3
| S8 | `MMVQ_IL` (2-4 and 5-8 columns) | not ported | on | estimate 0.10-0.40; CUPTI role K12 shows our dense projections faster by 0.70 in total | upstream plan | device | open |
| S10 | batched K/V append and indexer append | per row (`verify_qsa_append_analytic` 138 x 1.04 us, `mtp_original_append` 49 x 1.6 us) | batched (`append` 12 x 3.0 us, `kv_append_q8` 14.6 x 2.2 us) | estimate 0.05-0.10 | upstream plan, CUPTI | device | open |
| V2 | FFN phase (doorbell to `add_hits` end) | 6.600 | 5.293 | +1.307 | CUPTI | device | open |
| V4 | doorbell to first routed expert (gate/up) start, us | 27.6 | 15.0 | +12.6 us x 48 = +0.60 ms | CUPTI | device | fixing |
| V4a | shared expert on a side stream, forked after the doorbell, joined before the combine (`LELEKA_SM120_SIDE_SHARED`, code `255159a89`, off) | 27.6 us before the first expert | 15.0 us | section delta pending (`spd-sqw` window `CE.1`); identity `spd-sqid1` P4 PASS: 2057 rows bit-identical, draft trace 518/518; A/B `spd-sqe` queued | CUPTI | device | fixing |
| V4 | doorbell to first routed expert (gate/up) start, us | 27.6 | 15.0 | +12.6 us x 48 = +0.60 ms; with `SIDE_SHARED` (`CE.1`) 10.9 us, i.e. below VANL (`CT.1` 11.5 us) | CUPTI | device | fixing (closed by V4a when its A/B passes) |
| V4a | shared expert on a side stream, forked after the doorbell, joined before the combine (`LELEKA_SM120_SIDE_SHARED`, code `255159a89`, off) | 27.6 us before the first expert | 15.0 us | section delta (`CE.1` against `CL.1`): doorbell to first expert 27.6 -> 10.9 us (VANL 15.0), FFN phase 6.600 -> 6.267 ms (-0.333; qsa layers 99.8 -> 87.6, gdn 109.3 -> 102.7 us p50), graph p50 12.386 -> 11.944 ms (-0.44); identity `spd-sqid1` P4 PASS: 2057 rows bit-identical, draft trace 518/518; A/B `spd-sqe` queued | CUPTI | device | fixing |
| V4b | routed experts on their own branch (VANL: plan wait, VRAM experts, `fetch_blobs`, CPU wait, `add_hits` on a side stream; main stream does the shared expert and the next norm) | all on the capture stream | branch | rest of V2 after V4a, not yet known | CUPTI | device | open |
| V4c | norms and hyper-connection reads (`gr_norm_split`, `gr_down`, `gr_up`) as separate branches | main stream | main stream (VANL does not branch them; a layer's `gr_*` chain stays on the main stream) | no structural difference; kernels in K8..K10 | CUPTI | device | proved-equal |
| V5 | flag waits on the CPU leg (`verify_wait_flag_ge` 96 x 26.9 us + `chain_wait_copy_i32` 48 x 5.4 us against `wait_flag_ge` 144 x 8.1 us) | 2.836 | 1.160 | +1.676 | CUPTI | device | open |