mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #792] [CLOSED] batch slots: the zero-doorbell graph (100% VRAM resident) rings no layer #2829
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2829
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/792
Author: @0xPreDa
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:fix/batch-all-resident📝 Commits (10+)
fa16567setup: an earlier config that does not parse is skipped, not a crash; configs are written atomically (#459)749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it📊 Changes
2 files changed (+21 additions, -3 deletions)
View changed files
📝
serve/server.py(+5 -2)📝
src/core/verify.cpp(+16 -1)📄 Description
Fixes #776.
Cause
When a stage holds every one of its experts in VRAM, its verify window is recorded as the zero-doorbell graph (#646):
record_windowpublishes no per-layer doorbell (m_seq_is never rung), and the only host wait left in the graph is layer 1'swait_flag_ge(m_flag_, 1), before it copies the PLE rows.The solo window already handles this. In
Verifier::run(src/core/verify.cpp, theif (all_resident_ && !test_stall)branch), the host gathers the PLE rows, raises*flag = 1once and skips the per-layer loop.The batch windows are recorded by the same
record_window, but both batch host paths still wait for layer 0's ring:run_slot_rows(without--batch-groups):while (*seq < want)never ends atk = 0. After 20 s it reportsverify batch: timed out at layer 0, the engine exits and the server restarts it.batch_launch/batch_poll(with--batch-groups): the same wait, inbatch_poll.As a result, on any rig where a stage holds 100% of its experts, the first batch window fails - even with a single busy slot (
captured the batch window over slots 0), with or without--batch-groups. The measurements in BATCHING.md were taken on cards that never reached 100% residency, which is why it did not show up there. #776 (2x RTX PRO 6000) and my 4x RTX 4090 split both reach it.Fix
run_slot_rows: whenall_resident_, raiseh_flag_to 1 once (stage_batchhas already gathered the PLE rows before the launch) and skip the per-layer loop. The stream synchronization that follows waits for the window as before.batch_launch: whenall_resident_, raiseh_flag_to 1 and setb_k_ = b_steps_, so thatbatch_pollonly polls the stream.serve/server.py,_take_control:restart()runs__init__again while requests are waiting for the control lines, which replaceswait_lensand resetswaiting. The waiting request'sfinallyblock then raisedValueError: list.remove(x): x not in listand could drivewaitingbelow zero; it showed up asthe engine reported an error: list.remove(x): x not in listafter each stall. The cleanup now tolerates a restart (identity check,max(0, ...)).Stages that are not fully resident (doorbell graph) are unchanged: the new branches only run when
all_resident_is true.Testing
Linux, 4x RTX 4090 (24 GB, no P2P), CUDA 13.0, sm_89, engine 0.1.39 with this patch, GSQ-RCO IQ3_S,
--layer-split 12,24,36 --trim-stage-weights --batch 4 --batch-groups 4, prefill 2048, 262144-token context. All four stages report100% VRAM resident: zero-doorbell graph. Requests go through the HTTP server, with short prompts (0-12K tokens) and long ones (30K-100K tokens):verify batch: timed out at layer 0), 9-10 restarts per runserve.test_parallel,serve.test_lifecycleandserve.test_serverpass (158 tests).Not tested: Windows, HIP, and a split where some stages are fully resident and others are not.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.