Repository navigation
spark-model+server: DFlash2 batched verify/propose for generic heads (γ-shaped rows, stream ordering, multi-lane) - #52
Conversation
propose_batch ran the Lightning Bxgamma seam (owners collection, DsparkBatchInput::validate, packed uploads, staged backbone) before every dispatch — and its gamma == LIGHTNING_SERVED_GAMMA (4) contract rejected generic gamma=8 heads outright, so the multi-lane tail was unreachable for non-Lightning models even with ATLAS_DFLASH_PROPOSE_LANES > 1. Generic DFlash never consumes the seam's staged result (the native rows are only authoritative under native_batch_authoritative / batch_parity), so skip the seam entirely for generic heads and dispatch straight to the per-lane enqueue/collect path. propose_batch_max now reports batch_capacity when lane_count() > 1, letting the scheduler's cap >= min gate admit batched calls; the single-lane serial arm is unchanged. propose_on_lanes is the extracted tail, verbatim.
Wraps serve-amd.sh with the certified gamma=8 Option-B profile baked in (util 0.80, seq 8192, prefill 2048, kv bf16, lm_head nvfp4, batch=1, thinking off) so the handoff is a single command. All knobs stay env-overridable.
Two multi-lane propose fixes exposed by the lanes=4 sweep: - forward_block(defer_readback=true) returns Vec::new(), so the draft cap in propose_drafts_on_lane ran on an empty vec and the deferred readback handed verify all γ rows uncapped — an 8-draft / 9-token verify window vs pools sized for K=8 (7 h / 8 conv intermediates). decode_verify_dflash refused every multi-lane seq. read_deferred_drafts now takes the scheduler-K cap; last_num_drafted is set from the collected drafts. - Piecewise graph capture on a lane stream (lane 0 IS the default stream) leaks capture mode when any op between begin/end fails — every subsequent unrelated-stream op then fails CAPTURE_ISOLATED and every sync on the capturing stream fails 900. Suppress propose graphs under defer_readback; multi-lane stays eager until per-lane capture ownership is proven safe.
dcf917d
into
integration/nvidia-lane-2026-09-20
|
Fixed — powershell -ExecutionPolicy Bypass -File scripts\strix-windows\first_run.ps1 -Phase build
powershell -ExecutionPolicy Bypass -File scripts\strix-windows\win_serve_dflash2.ps1The script is the standalone DFlash2 γ=8 Option-B serve (batch=1, util 0.80, seq 8192, kv/lm_head bf16) — binary discovery off |
|
For anyone landing here from elderorb's test report: Where to get it:
Verified live on winbox: On the reported OOM: the hand-port's shape differs from the tested profile — the script pins |
Summary
DFlash2 batched-concurrency support for generic (non-Lightning) heads — the four-commit stack:
5da27757aspark-model: admit DFlash gamma-shaped rows to batched verify — extendscan_batch_verifybeyond the MTP 2..=4 ladder tok = γ+1rows (bounded bydflash_hidden_savegeometry, R ≤ 96 chunk cap), wires owner-slot-indexedtry_dflash_capture_batched_atinto the batched forward, and vetoes CUDA-graph capture on this lane (owner-region destinations aren't covered by the(ssm_slot, k)graph key).1d9f87b62spark-server: respect the head's batched-propose envelope for DFlash — the scheduler now consultspropose_batch_maxbefore callingpropose_batch(generic DFlash declares max=1 → clean serial fallback over ALL pending seqs instead of a γ-contract error +pending.first()only).5f01b98fbspark-model: order DFlash front-region copies on the default stream — root cause of the acceptance collapse:preserve/pack/restore_dflash_save_*used the caller's literal stream0(legacy stream) while capture andcommit_ctxrun on the model'sCU_STREAM_NON_BLOCKINGdefault stream —commit_ctxraced the pack and accumulated stale/foreign hidden stacks intoctx_hidden_acc. Now usesself.gpu.default_stream()like every sibling helper.94f09a2fbspark-model: enable multi-lane batched propose for generic DFlash — generic heads skip the Lightning B×γ seam (whoseγ==4contract rejected γ=8 anyway, and whose output they'd discard) and dispatch to the existing per-lane overlapped propose (ATLAS_DFLASH_PROPOSE_LANES);propose_batch_maxreportsbatch_capacitywhenlane_count() > 1.GB10 validation (nvidia/Qwen3.8-27B-NVFP4 + incoai/Qwen3.8-27B-DFlash2, γ=8, Option B, bs16, util 0.70)
Concurrency sweep, aggregate tok/s:
3b4f7c2e0(batched verify unreachable)5f01b98fb(envelope + stream fix)576441191(merge head)mean_naflat ~2.6-3.2 across batch widths post-fix (was 0.35 collapsed at n=12 before the stream fix). Multi-lane propose (94f09a2fb, lanes=4) validation running as jobs 210-212 on reiner — expected to collapse the ~647ms serial propose at n=12.Known follow-ups
gdn_decode_wy8kernel needed for the batched WY fast path at k=8 (today: correct per-seq fallback).dflash2_selector_paritytest's bf16 grid has too few distinct values at n=4096 (pre-existing on the lane, identical at3b4f7c2e0).Generated with Devin