mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #526] [CLOSED] Allow conversation parking under --layer-split (owner-routed per-stage capture/restore) #2675
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#2675
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/526
Author: @chimpera
Created: 10/2/2026
Status: ❌ Closed
Base:
main← Head:pr/layer-split-parking📝 Commits (1)
6d309b9Support layer-split whole-session parking (port of Ropewalk's stage capture)📊 Changes
4 files changed (+155 additions, -48 deletions)
View changed files
📝
include/strata/core/conversation_cache.hpp(+2 -2)📝
include/strata/core/conversation_snapshot.hpp(+21 -5)📝
src/core/conversation_state.cpp(+120 -32)📝
src/program/generate.cpp(+12 -9)📄 Description
The problem
Today
--layer-splitand--conversation-cache-mibcannot be combined — the server refuses to start:(
src/program/generate.cpp, thereturn 2guard.) A multi-GPU split therefore cannot park conversations at all: every conversation switch re-prefills the whole session, exactly the cost parking exists to avoid.The change
Teach the snapshot core which GPU stage owns each QSA layer:
conversation_snapshot.hpp:ConversationStageRef {dev, lb, le, ss}and a trailinglaterparameter (default{}) onbytes/capture_bytes/save/validate/restore— every single-GPU caller and test compiles unchanged.conversation_state.cpp:owner_of/owner_statemap a QSA layer to its stage via[lb, le); per-layer K/V saves/restores go to/from the owner's session under anOnDeviceguard (the primary session's buffers for another stage's layers are allocated but never written). The live checkpoint gains one running-state part per later stage, assembled exactly as the ordinary split checkpoint path does; the draft rides the last stage. Validation requiresstage_parts.size() == later.size().generate.cpp: drop the--layer-splitparking rejection; build the stage refs from theGpuStagetable once beside the cache and pass them at the estimate/save/validate/restore sites; theSTRATA_SNAPSHOT_VERIFYread-back runs on the draft's (last stage's) device.Validation
Measured on a 2-way split (RTX 3090 ×2,
--layer-split 24):STRATA_SNAPSHOT_VERIFY)The same change has been running in a daily-driver split deployment with the conversation cache on (parking, restore and incremental re-park exercised by live traffic). Python suite on this branch: 100 tests OK (
python -m unittest serve.test_server).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.