Parking with a layer split: the draft ring with the last stage, on its GPU; guards; trim log

- The draft layer's K/V lives on the last stage's GPU (the drafter is loaded there); its save, ring restore and
  verification now run with that stage's image under that device, instead of with stage 0's image on GPU 0, where
  the ring restore kernel ran against another GPU's memory (seen in Niko1221/Strata#653, which places it the same way).
- Parking with a layer split on one GPU (--split-device 0) is refused at start: untested.
- The whole-session validate refuses an image with stage images; clearer message for stage parts in live.
- --trim-stage-weights says which layers each GPU loads, and fails when index.txt cannot be read.
- conversation_snapshot_test: the whole-session refusal; parking_test.py runs with STRATA_SNAPSHOT_VERIFY=1.
This commit is contained in:
benoit lange committed 2026-10-03 18:14:59 +02:00
1 parent af7918f02d
commit 2871ff4b68
4 files changed
+48 -15

No files matched your search

+4 -1
View File
@@ -275,7 +275,8 @@ bool conversation_snapshot_save(SavedConversation& image, const ConversationView
bool conversation_snapshot_validate(const SavedConversation& image, const SessionState& ss,
const ModelGeometry& g, const QsaState* draft, std::string& error) {
if (!image.live.stage_parts.empty()) return fail(error, "layer-split parking is not supported");
if (!image.live.stage_parts.empty())
return fail(error, "a running checkpoint's stage parts belong in the stage images, not in live.stage_parts");
if (image.geometry != geometry_key(g)) return fail(error, "incompatible runtime geometry");
// an image holds exactly one carve's running state and K/V: same layer range or nothing
if (image.layer_lo != ss.layer_lo || image.layer_hi != ss.layer_hi)
@@ -320,6 +321,8 @@ bool conversation_snapshot_save(SavedConversation& image, const ConversationView
}
bool conversation_snapshot_validate(const SavedConversation& image, const SessionState& ss, const ModelGeometry& g,
const QsaState& draft, std::string& error) {
// the whole-session form: a layer split's image (stage images) is restored stage by stage, never through here
if (!image.stage_images.empty()) return fail(error, "a layer split's image restored as a single session");
return conversation_snapshot_validate(image, ss, g, &draft, error);
}
ConversationRestore conversation_snapshot_restore(const SavedConversation& image, SessionState& ss,