ledger: section deltas of check merge, park fast and graph reuse (profiled boots)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-11-10 18:04:17 +01:00
co-authored by Claude Sonnet 5.5
parent c15f43020e
commit 79cec246cb
+3 -3
View File
@@ -39,8 +39,8 @@ No per-step figure exists for A1-A3; each is a `not measured` row that needs a s
| B1 | prefill GDN and QSA stages of a small tail (per stage split) | `prof-l5/Q.1` has moe, moe.ring, gdn, qsa, input per chunk | none for vanilla | n/a | PROFILE | hex-finish | open |
| B2 | first token sampling and publication after prefill | not measured | not measured | n/a | none | hex-finish | open |
| Q6 | `prefill.refill` of the lent expert slots (2,226 copy spans) | 137-140 ms per request | none | +138 ms; deferring it into the decode assembly (`LELEKA_REFILL_DEFER`): decode -0.92 % (CI -1.63..-0.21), end-to-end +0.56 % (CI -0.15..+1.27) | PROFILE, A/B `ab-l5v2` | hex-finish | fixing |
| Q7 | `decode.assemble` (graph re-recording per request: `record_all` 83 ms of 98-109 ms, nine graphs, 54-62 capture + 27-30 instantiate) | 98-109 ms per request | none (vanilla keeps its graphs) | +98-109 ms | PROFILE | both | fixing (code 7570247d9, wired behind `LELEKA_DECODE_GRAPH_REUSE`, identity and section delta pending on the GPU): the speed session's handles, `park`/`rearm`/`reseed` and this side's key, `GraphReuse::begin`/`end`, QSA owner loan, drafter decision, shared-expert pin and stack wiring are merged and tested host-side and on the lifecycle fake; compare `decode.assemble` with `decode.reuse`, `decode.disassemble` with `decode.keep`, `record.*`, the first-draft capture, VRAM at the low-water mark; design and scenarios `docs/experiments/decode-graph-reuse.md` GPU (job `host-decode-graph-reuse-identity-and-profile`, package `pkg-s6` = our wiring + the speed session's handles/re-arm, 4 profiled boots x 30 requests): REUSE WORKS. Per request, shipped (AP.1/AP.2): `decode.assemble` 103.5/104.1 ms (`record_all` 86.5/86.9, capture 34.0, instantiate 22.2) + `decode.disassemble` 14.7/12.3 = 118/116 ms. With `LELEKA_DECODE_GRAPH_REUSE=1` (RGP.1/RGP.2): `decode.assemble` 6.0 + `decode.reuse` 14.0/13.8 + `decode.keep` 0.7/0.6 = 20.7/20.4 ms, `record_all` 5.4 (the one full assembly of the first request averaged over 30), `record.capture` 1.1, `record.instantiate` 1.3: section delta about -97 ms per request (a reused request costs ~18 ms: re-arm with the 118 MB reseed). 29 of 30 requests reused, 1 full assembly, zero `decode graphs recorded again` lines (no retire), all HTTP 200. VRAM low-water unchanged (535 MiB free in both). ms/token (unpaired, free-running): 6.18/6.19 shipped against 6.10/6.12 with reuse. Identity: teacher-forced bitwise job queued (`host-draft-switches-teacher-forced-identity`, P4); free-running hashes cannot decide it BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FIXED for the section: -97 ms per request (118 to 20.7 ms) and identity; ON by default in the three 5090 profiles (`LELEKA_DECODE_GRAPH_REUSE=1`, test `the_switches_that_passed_the_bitwise_gate_are_on_for_the_5090_profiles_only`); the end-to-end paired A/B of the group is still to come GROUP A/B 2026-11-10 (job `host-draft-switches-group-ab`, n=10 per arm, 30 requests each, free-running): the group arm X = chain pipeline + check merge + park fast (reuse RG is NOT in X; its own paired e2e arm is still to run). Decode ms/token A 6.33, X 6.30, paired -0.03 +-0.08 (no regression, no gain visible); session time A 329 +-19 s, X 340 +-20 s but output lengths differ run to run (free-running), so time per equal-output pair is the fair figure: 66 pairs with output within 2 %, mean X-A -73 ms (se 46), median -5 ms. Section deltas stand (Q7 -97 ms per request); the e2e effect is below the A/B noise (about 3 % of session time), CLOSED on section + bitwise identity; ON in the three 5090 profiles; e2e confirmation by RG paired arm pending. |
| B3 | prefill: prefix-cache parking in the request path (code `prefix.export_kv` 19.0 + `export_index` 2.3 + `park_tail` 14.7 + `park_block` 6.5 + `after_prefill` 9.4 + `after_chunk` 0.7 + `after_decode` 12.5, mean per request) | 65.1 ms | vanilla parks the conversation (checkpoints) inside its own prompt time, not separable | n/a until the instrumented vanilla | PROFILE `runs/dc1` | hex-finish | fixing (code a88a77b25, switches `LELEKA_PREFIX_PARK_FAST=1` and `LELEKA_PREFIX_PARK_ASYNC=1`, both off by default, identity and section delta pending). Reading of the code: the seven listed spans are nested, not additive (`export_kv` and `export_index` sit inside `park_block` and `park_tail`, which sit inside `after_prefill`, `after_chunk` and `after_decode`), so the request-path total is `after_prefill` + `after_chunk` + `after_decode` = 22.6 ms, not 65.1 ms. FAST: one context drain per park instead of 12, K/V pages copied into unzeroed vectors, index rows take the device-read staging as the result (same bytes; compare `prefix.export_kv` and `prefix.export_index`, new `prefix.export_drain`; the sub-spans `export.copy_fast` and `export.index_copy_fast` replace `export.sync`, `export.alloc`, `export.copy`, `export.index_alloc`, `export.index_copy`). ASYNC (with `--prefix-cache-tail reply`): the `after_decode` part (12.5 ms) is taken after the terminal event of the request, before the prefix summary and before the next request, and reported on the line `DBG profile park_deferred` (sum the `request` and `park_deferred` lines for an equal-work comparison); the tail node is in the store before the next request exactly as before. Not deferred: `after_prefill` and `after_chunk` (the last page also holds cells the decode overwrites and the recurrent state the decode advances, so a later park gives other bytes). Not done: pooled buffers (the store retains the vectors) and threaded copies of the 12 layers. GPU run 2026-11-09 (`prefill-prefix-park-identity-and-profile`): FAST kept the prefix reuse and cut the three `after_*` sections by 2.0 ms (23.5 to 21.5; the first-touch page faults of fresh host memory dominate and stay); ASYNC was refused by the runner (the busy mark `active` was still set while the owner ran the deferred step, so the next request got `runtime_capacity`). Fixed in the next commit: the busy mark is released before the deferred step, so a request that arrives meanwhile is admitted and waits in the control queue (test `a_request_arriving_during_the_deferred_tail_is_admitted_and_queued_not_refused`); pass criterion for the rerun: `cached_tokens` equal to shipped for all 30 and no `engine refused` in requests.log. Pre-faulted buffer pool not built: the store keeps every parked vector, so a pool is the store budget held pre-touched (tens of GiB, or sizes that do not match the variable tail) and needs a store free list or a slab type; allocator tuning (`MALLOC_TOP_PAD_`, `MALLOC_TRIM_THRESHOLD_`) can be tried without code BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FAST: identity PASS and section -2.0 ms per request: ON by default in the three 5090 profiles (`LELEKA_PREFIX_PARK_FAST=1`); ASYNC is not in the default (admission fix queued for the rerun `prefill-prefix-park-async-fix-identity-and-profile`) ASYNC rerun 2026-11-10 (job `prefill-prefix-park-async-fix-identity-and-profile`, after fix 955a72e37): no `engine_refused`/`runtime_capacity` in any of the 8 boots; `cached_tokens` equal to the shipped arm for 30 of 30 requests in every arm (1,202,318 total); `prefix.after_response` 8.7 ms median on the `park_deferred` line, the work leaves the request path (`prefix.export_kv` 17.0 to 7.6 ms median, `park_tail` 13.7-15.2 to 6.3 ms) but `prefix.after_prefill` is 9.6/9.9 ms vs 10.5/11.1 (shipped) and 9.4 (FAST): the request path gains nothing measurable beyond FAST. FAST CLOSED (bitwise identity + section delta, ON in 5090 profiles); ASYNC stays OFF (no delta beyond FAST, adds a deferred step). |
| Q7 | `decode.assemble` (graph re-recording per request: `record_all` 83 ms of 98-109 ms, nine graphs, 54-62 capture + 27-30 instantiate) | 98-109 ms per request | none (vanilla keeps its graphs) | +98-109 ms | PROFILE | both | fixing (code 7570247d9, wired behind `LELEKA_DECODE_GRAPH_REUSE`, identity and section delta pending on the GPU): the speed session's handles, `park`/`rearm`/`reseed` and this side's key, `GraphReuse::begin`/`end`, QSA owner loan, drafter decision, shared-expert pin and stack wiring are merged and tested host-side and on the lifecycle fake; compare `decode.assemble` with `decode.reuse`, `decode.disassemble` with `decode.keep`, `record.*`, the first-draft capture, VRAM at the low-water mark; design and scenarios `docs/experiments/decode-graph-reuse.md` GPU (job `host-decode-graph-reuse-identity-and-profile`, package `pkg-s6` = our wiring + the speed session's handles/re-arm, 4 profiled boots x 30 requests): REUSE WORKS. Per request, shipped (AP.1/AP.2): `decode.assemble` 103.5/104.1 ms (`record_all` 86.5/86.9, capture 34.0, instantiate 22.2) + `decode.disassemble` 14.7/12.3 = 118/116 ms. With `LELEKA_DECODE_GRAPH_REUSE=1` (RGP.1/RGP.2): `decode.assemble` 6.0 + `decode.reuse` 14.0/13.8 + `decode.keep` 0.7/0.6 = 20.7/20.4 ms, `record_all` 5.4 (the one full assembly of the first request averaged over 30), `record.capture` 1.1, `record.instantiate` 1.3: section delta about -97 ms per request (a reused request costs ~18 ms: re-arm with the 118 MB reseed). 29 of 30 requests reused, 1 full assembly, zero `decode graphs recorded again` lines (no retire), all HTTP 200. VRAM low-water unchanged (535 MiB free in both). ms/token (unpaired, free-running): 6.18/6.19 shipped against 6.10/6.12 with reuse. Identity: teacher-forced bitwise job queued (`host-draft-switches-teacher-forced-identity`, P4); free-running hashes cannot decide it BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FIXED for the section: -97 ms per request (118 to 20.7 ms) and identity; ON by default in the three 5090 profiles (`LELEKA_DECODE_GRAPH_REUSE=1`, test `the_switches_that_passed_the_bitwise_gate_are_on_for_the_5090_profiles_only`); the end-to-end paired A/B of the group is still to come GROUP A/B 2026-11-10 (job `host-draft-switches-group-ab`, n=10 per arm, 30 requests each, free-running): the group arm X = chain pipeline + check merge + park fast (reuse RG is NOT in X; its own paired e2e arm is still to run). Decode ms/token A 6.33, X 6.30, paired -0.03 +-0.08 (no regression, no gain visible); session time A 329 +-19 s, X 340 +-20 s but output lengths differ run to run (free-running), so time per equal-output pair is the fair figure: 66 pairs with output within 2 %, mean X-A -73 ms (se 46), median -5 ms. Section deltas stand (Q7 -97 ms per request); the e2e effect is below the A/B noise (about 3 % of session time), CLOSED on section + bitwise identity; ON in the three 5090 profiles; e2e confirmation by RG paired arm pending. SECTION DELTA 2026-11-10 (job `host-set-profile-paired-section-deltas`, one profiled boot per arm, 15 requests, package pkg-s9; AP shipped, YP = check merge + park fast + graph reuse): `decode.assemble` 97.8 ms median + `decode.disassemble` 12.0 ms (= 109.8 ms per request) became `decode.reuse` 13.1 ms + `decode.keep` 0.63 ms (= 13.8 ms) on 14 of 15 requests; the first request records (assemble 178 ms, `record_all` 162 ms vs 81.6 ms shipped, the one-time cost of building the held set); over all 15: 1,726 ms to 373 ms = -90 ms per request including the cold one (-96 ms on the 14 warm ones). Matches the earlier -97 ms. FIXED: section delta + bitwise identity (teacher-forced 2057/2057 rows); ON in the 5090 profiles. |
| B3 | prefill: prefix-cache parking in the request path (code `prefix.export_kv` 19.0 + `export_index` 2.3 + `park_tail` 14.7 + `park_block` 6.5 + `after_prefill` 9.4 + `after_chunk` 0.7 + `after_decode` 12.5, mean per request) | 65.1 ms | vanilla parks the conversation (checkpoints) inside its own prompt time, not separable | n/a until the instrumented vanilla | PROFILE `runs/dc1` | hex-finish | fixing (code a88a77b25, switches `LELEKA_PREFIX_PARK_FAST=1` and `LELEKA_PREFIX_PARK_ASYNC=1`, both off by default, identity and section delta pending). Reading of the code: the seven listed spans are nested, not additive (`export_kv` and `export_index` sit inside `park_block` and `park_tail`, which sit inside `after_prefill`, `after_chunk` and `after_decode`), so the request-path total is `after_prefill` + `after_chunk` + `after_decode` = 22.6 ms, not 65.1 ms. FAST: one context drain per park instead of 12, K/V pages copied into unzeroed vectors, index rows take the device-read staging as the result (same bytes; compare `prefix.export_kv` and `prefix.export_index`, new `prefix.export_drain`; the sub-spans `export.copy_fast` and `export.index_copy_fast` replace `export.sync`, `export.alloc`, `export.copy`, `export.index_alloc`, `export.index_copy`). ASYNC (with `--prefix-cache-tail reply`): the `after_decode` part (12.5 ms) is taken after the terminal event of the request, before the prefix summary and before the next request, and reported on the line `DBG profile park_deferred` (sum the `request` and `park_deferred` lines for an equal-work comparison); the tail node is in the store before the next request exactly as before. Not deferred: `after_prefill` and `after_chunk` (the last page also holds cells the decode overwrites and the recurrent state the decode advances, so a later park gives other bytes). Not done: pooled buffers (the store retains the vectors) and threaded copies of the 12 layers. GPU run 2026-11-09 (`prefill-prefix-park-identity-and-profile`): FAST kept the prefix reuse and cut the three `after_*` sections by 2.0 ms (23.5 to 21.5; the first-touch page faults of fresh host memory dominate and stay); ASYNC was refused by the runner (the busy mark `active` was still set while the owner ran the deferred step, so the next request got `runtime_capacity`). Fixed in the next commit: the busy mark is released before the deferred step, so a request that arrives meanwhile is admitted and waits in the control queue (test `a_request_arriving_during_the_deferred_tail_is_admitted_and_queued_not_refused`); pass criterion for the rerun: `cached_tokens` equal to shipped for all 30 and no `engine refused` in requests.log. Pre-faulted buffer pool not built: the store keeps every parked vector, so a pool is the store budget held pre-touched (tens of GiB, or sizes that do not match the variable tail) and needs a store free list or a slab type; allocator tuning (`MALLOC_TOP_PAD_`, `MALLOC_TRIM_THRESHOLD_`) can be tried without code BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FAST: identity PASS and section -2.0 ms per request: ON by default in the three 5090 profiles (`LELEKA_PREFIX_PARK_FAST=1`); ASYNC is not in the default (admission fix queued for the rerun `prefill-prefix-park-async-fix-identity-and-profile`) ASYNC rerun 2026-11-10 (job `prefill-prefix-park-async-fix-identity-and-profile`, after fix 955a72e37): no `engine_refused`/`runtime_capacity` in any of the 8 boots; `cached_tokens` equal to the shipped arm for 30 of 30 requests in every arm (1,202,318 total); `prefix.after_response` 8.7 ms median on the `park_deferred` line, the work leaves the request path (`prefix.export_kv` 17.0 to 7.6 ms median, `park_tail` 13.7-15.2 to 6.3 ms) but `prefix.after_prefill` is 9.6/9.9 ms vs 10.5/11.1 (shipped) and 9.4 (FAST): the request path gains nothing measurable beyond FAST. FAST CLOSED (bitwise identity + section delta, ON in 5090 profiles); ASYNC stays OFF (no delta beyond FAST, adds a deferred step). SECTION DELTA 2026-11-10 (same job): `prefix.after_prefill` + `prefix.after_decode` per request AP 13.30 + 10.01 = 23.3 ms, YP 13.01 + 7.21 = 20.2 ms (-3.1 ms, -13 %; earlier job: -2.0 ms); `prefix.park_tail` 16.8 to 15.3 ms, `prefix.export_drain` 3 context drains per park instead of 12 (counter 0.00/3), `prefix.export_index` 3.50 to 2.89 ms; `prefix.export_kv` 22.6 to 25.3 ms (the copies themselves are the same bytes). FAST FIXED: section delta -2..-3 ms per request + bitwise identity; ON in the 5090 profiles. ASYNC stays OFF. |
| B4 | decode hand-over: tear-down of the request (code `decode.disassemble`) | 11.7 ms per request | none | +11.7 ms | PROFILE `runs/dc1` | hex-finish | open |
| B5 | host: admission of CPU work (code `cpu.admit`, 819 calls per request) | 43.2 ms per request | not measured | n/a | PROFILE `runs/dc1` | hex-finish | open |
@@ -59,7 +59,7 @@ Round-level totals first (they are the sum of the steps below).
| id | step | LEL | VANL | difference | source | owner | status |
| --- | --- | ---: | ---: | ---: | --- | --- | --- |
| O9 | draft: chain steps and the host idle between them (code `LELEKA_DRAFT_CHAIN_PIPELINE`) | 0.272 ms per round (2.38 boundaries x 114 us) | idle inside the draft 0.52 ms on 4.5 streams (draft span at equal steps: 1.83 against 1.85) | +0.27 | ORCH | hex-finish | fixing: S1 `LELEKA_DRAFT_CHAIN_PIPELINE` (code `1ab37e408`, opt-in; all chain steps of a greedy draft with min_p 0 enqueued back to back, one drain, flags read once); package `pkg-s1`, identity and profile pair job `host-draft-chain-one-pass-identity`, paired A/B job `host-draft-chain-one-pass-ab` GPU (job `host-draft-chain-gate-diagnosis`, 8,377 drafts): `mtp.chain_gate.min_p` for ALL of them: the adaptive plan gives every round a positive `min_p` (the chain stops at the first step whose probability is below it), so the pipelined path (greedy, `min_p` 0) never engages in production; `mtp.chain_step` stays 0.480 ms x 2.66 steps per round. Pipelining a chain with an early stop would enqueue steps the sequential path never runs (each ~0.45 ms of GPU) against a gain of ~0.1 ms per boundary, so it is a loss without a device-side stop. S1 stays off, parked; the remaining 0.272 ms per round of host turnaround is open for cheaper per-step sync |
| O8 | draft: finite and q8 guard checks of the MTP ring (code `mtp_original_finite` 158.8 x 0.87 us, `mtp_original_q8_guard` 28 x 0.87 us per round, 186.8 launches) | 0.162 | none | +0.162 | CUPTI | hex-finish | fixing (code 306b39807, switch `LELEKA_DRAFT_CHECK_MERGE`, off by default; identity and section delta pending): S2' launches every run of ADJACENT checks of a draft step program as one `mtp_original_check_batch` (new sealed asset `mtp_original_check_batch.ptx`; each entry keeps its own buffer, count, kind and status word, so the status words are the separate launches' words). Per step 48 check launches, 3 runs (prefix guards after the GR block 5, tail after the MLP GR 5, tail after the shared gate and up 2): 12 launches become 3, 9 fewer per step, 36 per round at 4 steps (expect `mtp_original_finite` 158.8 to about 111 and `mtp_original_q8_guard` 28 unchanged per round (the merged runs hold finite checks only), plus about 12 `mtp_original_check_batch` launches, net 36 fewer; the upper bound of the gain is about 0.05 ms per round, no claim). Not done: moving a check across another command (deferral to the end of the chain): the checked buffers `qcur`, `r`, `xn`, `lo` are overwritten in place between their checks and the program has no write-set table, so it needs one first. Proofs: `cuda-model` `draft_check_batch` (the merged schedule expands to the separate one, and a NaN/Inf at the edges and middle of every buffer after every kernel leaves identical status words in a simulated step), driver tests on the real command lists, GPU test `check_batch_program_gpu` (`--ignored`, job `draft-check-merge-gpu-proof`) GPU: detection test PASS (73 cases: NaN/+Inf/-Inf in every buffer and Q8 scale, 72 raise a flag, 0 differ from the separate launches); step graph 114 -> 105 nodes (-9 per step, `DBG mtp chain-step graph`, job `host-draft-chain-gate-diagnosis` MCP against AP); section: `draft.finish` 1.392 -> 1.300 ms per round (single boot each, not paired: 6390 and 5744 rounds); bitwise identity under teacher forcing queued (`host-draft-switches-teacher-forced-identity`, P2). The free-running replay cannot decide identity: draft traces of DT, MT and XT diverge at the 12th draft and shipped against shipped differs across boots BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). Check merge: identity PASS, step graph 114 to 105 nodes: ON by default in the three 5090 profiles (`LELEKA_DRAFT_CHECK_MERGE=1`); the paired section delta stays to be read from the group A/B (`host-draft-switches-group-ab`) GROUP A/B 2026-11-10: see Q7 row (X arm includes check merge): no regression, ms/token paired -0.03 +-0.08. Identity bitwise PASS (teacher-forced, 1036/1036 draft lines); ON in the three 5090 profiles. The paired `draft.finish` delta was not profiled in that group job (no profile arm): a profiled arm X vs A is the remaining step for the section number. |
| O8 | draft: finite and q8 guard checks of the MTP ring (code `mtp_original_finite` 158.8 x 0.87 us, `mtp_original_q8_guard` 28 x 0.87 us per round, 186.8 launches) | 0.162 | none | +0.162 | CUPTI | hex-finish | fixing (code 306b39807, switch `LELEKA_DRAFT_CHECK_MERGE`, off by default; identity and section delta pending): S2' launches every run of ADJACENT checks of a draft step program as one `mtp_original_check_batch` (new sealed asset `mtp_original_check_batch.ptx`; each entry keeps its own buffer, count, kind and status word, so the status words are the separate launches' words). Per step 48 check launches, 3 runs (prefix guards after the GR block 5, tail after the MLP GR 5, tail after the shared gate and up 2): 12 launches become 3, 9 fewer per step, 36 per round at 4 steps (expect `mtp_original_finite` 158.8 to about 111 and `mtp_original_q8_guard` 28 unchanged per round (the merged runs hold finite checks only), plus about 12 `mtp_original_check_batch` launches, net 36 fewer; the upper bound of the gain is about 0.05 ms per round, no claim). Not done: moving a check across another command (deferral to the end of the chain): the checked buffers `qcur`, `r`, `xn`, `lo` are overwritten in place between their checks and the program has no write-set table, so it needs one first. Proofs: `cuda-model` `draft_check_batch` (the merged schedule expands to the separate one, and a NaN/Inf at the edges and middle of every buffer after every kernel leaves identical status words in a simulated step), driver tests on the real command lists, GPU test `check_batch_program_gpu` (`--ignored`, job `draft-check-merge-gpu-proof`) GPU: detection test PASS (73 cases: NaN/+Inf/-Inf in every buffer and Q8 scale, 72 raise a flag, 0 differ from the separate launches); step graph 114 -> 105 nodes (-9 per step, `DBG mtp chain-step graph`, job `host-draft-chain-gate-diagnosis` MCP against AP); section: `draft.finish` 1.392 -> 1.300 ms per round (single boot each, not paired: 6390 and 5744 rounds); bitwise identity under teacher forcing queued (`host-draft-switches-teacher-forced-identity`, P2). The free-running replay cannot decide identity: draft traces of DT, MT and XT diverge at the 12th draft and shipped against shipped differs across boots BITWISE IDENTITY PASS (job `host-draft-switches-teacher-forced-identity`, test binary `rt-pf9`, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). Check merge: identity PASS, step graph 114 to 105 nodes: ON by default in the three 5090 profiles (`LELEKA_DRAFT_CHECK_MERGE=1`); the paired section delta stays to be read from the group A/B (`host-draft-switches-group-ab`) GROUP A/B 2026-11-10: see Q7 row (X arm includes check merge): no regression, ms/token paired -0.03 +-0.08. Identity bitwise PASS (teacher-forced, 1036/1036 draft lines); ON in the three 5090 profiles. The paired `draft.finish` delta was not profiled in that group job (no profile arm): a profiled arm X vs A is the remaining step for the section number. SECTION DELTA 2026-11-10 (same job, per call over 8,697 / 9,518 / 7,771 draft rounds): `draft.finish` AP 1.548 ms, MCP (check merge only) 1.494 ms (-0.054 ms, -3.5 %), YP (the complete set) 1.577 ms (+0.029 ms, +1.9 %); `gpu.mtp_chain_step` 0.458 / 0.452 / 0.453 ms per step and `mtp.chain_step` 0.488 / 0.480 / 0.481 equal in all three. One boot per arm cannot resolve a 2-4 % difference (boot-to-boot spread of this profile is about 3 %), and YP does not reproduce MCP's gain: the section delta is at most -0.054 ms per round (about -30 ms per request at 580 rounds), not resolved. CLOSED on bitwise identity (1036/1036 draft lines) and the graph-node count (114 to 105); no regression found; ON in the 5090 profiles. A resolved per-round number would need 3 or more boots per arm (not scheduled: owner rule 2026-11-10). |
| K13 | draft chain role total (chain GR kernels, `mtp_*`) | 3.544 | 2.471 | +1.073 (includes the draft head and checks of R3 and O8; VANL books its draft in the shared GR kernels) | CUPTI role table | hex-finish | open (O8 `LELEKA_DRAFT_CHECK_MERGE` takes the adjacent checks out of this total once its section delta is measured) |
| O12 | draft: finish follows the window width (0.93 ms at T 3.0, 2.5 ms at T 6.2) | window price | | part of the +3.1 ms for +0.65 tokens per round | PROFILE | hex-finish | open |
| O2 | kernels outside big graphs | 630 | 147 | +483 | CUPTI | hex-finish | open |