mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2409] [CLOSED] [Engine] avoid CUDA OOM during conversation-cache restore #4031
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#4031
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/2409
Author: @MarsLuay
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-2408-conversation-restore-oom📝 Commits (4)
6b95fd3fix: skip conversation restore without VRAM headroomda4b978fix: keep single-GPU conversation restores eligible7b62cacMerge upstream/main into fix/issue-2408-conversation-restore-oomb116fd8fix: restore missing brace after conversation restore headroom check📊 Changes
3 files changed (+60 additions, -0 deletions)
View changed files
📝
include/strata/program/conv_cache.hpp(+12 -0)📝
src/program/conv_cache_test.cpp(+9 -0)📝
src/program/generate.cpp(+39 -0)📄 Description
Fixes #2408
Problem and result
On a two-GPU layer split, restoring a large conversation-cache snapshot can reconstruct K/V residency on a later GPU that is already below the configured VRAM reserve and terminate the server with CUDA OOM. This change admits a parked snapshot only when every sampled split device has the configured headroom; otherwise it returns the snapshot to the conversation cache and rereads the prompt. A failed or unavailable VRAM sample preserves the existing behavior. Single-GPU restores keep the existing path.
Approach
restore_has_headroompredicate ininclude/strata/program/conv_cache.hpp.--vram-reserve-mib.Validation
b116fd8f42f48e40156c82368e56a8431fee77ac:cmake -S C:/tmp/strata-pr-repo -B C:/tmp/strata-pr-repo/build-cpu -G Ninja -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debugcmake --build C:/tmp/strata-pr-repo/build-cpu --target split_rules_test conv_cache_test --parallel 4— passed.ctest --test-dir C:/tmp/strata-pr-repo/build-cpu -C Debug --output-on-failure -R "^(split_rules_test|conv_cache_test)$"— 2/2 passed.git diff --check— passed.conv_cache_testincludes the below-reserve single-GPU regression case.main/0.2.0-beta and current CUDA, HIP, and SYCL backend builds; these are the remaining checks after the tracker reset.Limits
This is a conservative restore-admission fallback. It does not guarantee cache reuse when split-device headroom is unavailable, and it does not change single-GPU restore admission.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.