While a prompt chunk's expert copy stream is active, Api::synchronize (the one
cuCtxSynchronize choke point every compute producer uses) waits for the legacy
default stream and every registered compute stream except the copy stream,
instead of the whole context (which also waited for every queued expert copy
and made all earlier overlap attempts degenerate). Every stream the crate
creates is registered; outside a chunk stream a drain is unchanged.
The ring's layer drain no longer waits for the copy stream in stream mode, the
per-layer status words are pooled (a cuMemFree per MoE layer synchronized the
device), and each scoped drain first tops the copy queue up by
LELEKA_PREFILL_TOPUP (48) entries; the layer end queues the next layer's first
entries. Diagnostics: LELEKA_PREFILL_COPY_STATS (per-chunk PREFILL-COPY line:
calls, bytes, DMA GB/s), LELEKA_PREFILL_ALLOC_TRACE, LELEKA_PREFILL_STREAM_JITTER
(race hunt), LELEKA_PREFILL_STREAM_SEQ (paired A/B passes in one process).
Still opt-in (LELEKA_PREFILL_STREAM=1) until the paired A/B and the quality
gates pass.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>