mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5452] Metal: restore spare pooled row on checkpoint rewind and rebind session in window_init #5432
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#5432
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/5452
Author: @devlier
Created: 11/7/2026
Status: 🔄 Open
Base:
main← Head:fix/metal-checkpoint-restore-and-rebind📝 Commits (1)
efa1de8Metal: restore spare pooled row on checkpoint rewind and rebind session in window_init📊 Changes
1 file changed (+5 additions, -0 deletions)
View changed files
📝
metal/src/engine/window.cpp(+5 -0)📄 Description
Summary
Follow-up to
d01b1817(Metal: conversations park and restore (#4730, #4144)):Restore the moving spare
pooled_row inWindow::checkpoint_restore:src/core/conversation_snapshot.cpp(const int64_t pooled = index && upto > 0 ? upto / s.idx_block + 1 : 0) and CUDA'sconversation_checkpoint_restore(src/core/conversation_state.cpp:429-432), rewinding to an earlier turn checkpoint must also restorec.deadinto the spare pooled rowrow = c.ids.size() / 4.std::memcpy((uint8_t*) pooled_[j].ptr + row * dsz, c.dead.data() + j * dsz, dsz)inWindow::checkpoint_restore.Always bind
SessionStateinwindow_initwhenx->ready()is already true:bind_session(ss)was only invoked insideWindow::initon the first!x->ready()call. Ifwindow_ensureinitialized the singleton window earlier orwindow_initis called with a re-initializedSessionState,x->bind_session(ss)ensuresss.qsa_statesis always bound to the window's K/V buffers.Verification
STRATA_GPU_METAL=1).conversation_memory_test(31 checks),conversation_cache_test(4,842 checks),conversation_validation_test(972 checks), and end-to-end 5,733-token multi-session park/restore (std::memcmp == 0).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.