mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #936] [CLOSED] layer split: overlap the stages' hand-off (STRATA_SPLIT_OVERLAP=1, op… #2925
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#2925
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/936
Author: @bsvinay
Created: 10/5/2026
Status: ❌ Closed
Base:
main← Head:pr-split-overlap📝 Commits (10+)
64d0136cache: preserve checkpoints when split allocation failsa0d0056prefill: fused-expert exact wins (table16 via direct selector, float4 moe_combine, LDS alias + occupancy)5f5452bserve: park_current's try covers the checkpoint split too (#752): a host OOM skips parking8b19a38Layer split: --vram-reserve-later-mib, a separate reserve for the later cardsea83d0dResident RAM mode with a layer splitd2d981fsetup: the low-RAM mode's resident variant on several GPUs (#642)cd62e5eserve: a split's stage-0 GPU profile line keeps its text (#848); later stages say which stage0471c5agenerate: residency-table uploads wait for their own copy before the non-blocking streams read the table2d82703generate: res_put syncs stream 0 (HIP has no cudaStreamLegacy) (#550)7cdc521verify: the all-resident graph runs only while every expert is in VRAM; a -1 raises a plan error flag (#871)📊 Changes
2 files changed (+7 additions, -2 deletions)
View changed files
📝
docs/MULTI_GPU.md(+1 -1)📝
src/program/generate.cpp(+6 -1)📄 Description
On 2x RX 7900 XTX the layer split decoded slower than one card (53/45 tok/s vs ~70/68, see #642). The cause is the order inside every verify window: stage 1 finishes, the host syncs its stream, then stages and launches stage 2's graph. Under HIP both the sync and the graph launch are expensive, and they sit on the critical path of every window while both cards are idle.
With STRATA_SPLIT_OVERLAP=1 (off by default; stages on different devices only):
handoff_publish: the hand-off payload with volatile stores (RDNA keeps plain stores to mapped memory in L2 - the same reason as doorbell_ring_kernel's volatile store), a system fence, and the last block raises the flag;wait_flag_ge(flag, 1);Verifier::runcaptures the next stage's window on its own thread, then stages and launches it on a helper thread (prelaunch) while it serves its own layers, goes straight on to serving the next stage's layers, and syncs the earlier stage only once the chain is done;release_gpu_waitsalso raises the hand-in flag, and an early return after the prelaunch releases the next stage (#267).Batch windows, --split-device 0 and the default path are unchanged. Docs: a section in docs/MULTI_GPU.md.
Measured on 2x RX 7900 XTX (gfx1100, ROCm, Linux), Ryzen 9 9900X, 52 GB RAM, Swift 1.5 IQ3_XXS, 128K context, 8-bit KV, split layers 0-25 / 26-47; 512-token greedy answers, median of 8 runs:
Not measured on NVIDIA, where a sync and a graph launch cost less - that is why it is opt-in. Happy to change the default or the switch name as you prefer.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.