mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3294
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/1185
Author: @ischencheng
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/batch-graph-vram📝 Commits (1)
d568ebfverify: a window graph that finds no VRAM frees older batch slot layouts' graphs instead of failing (#997)📊 Changes
2 files changed (+72 additions, -36 deletions)
View changed files
📝
include/strata/core/verify.hpp(+6 -1)📝
src/core/verify.cpp(+66 -35)📄 Description
With
"parallel": N, every set of slots that decodes together gets its own window and commit graph pair (exec_bm_/commit_bm_, keyed by the row layout), and they stay for the life of the engine unless--batch-mtpsets its limit of 64. On an L40S one pair takes 20-30 MiB (more rows, more MiB), and 8 slots have 255 possible sets. The expert cache sizes itself to leave only--vram-reserve-mibfree, so after a dozen or a few dozen layouts the nextcudaGraphInstantiatefails and the engine exits withverify: batch instantiate: out of memory. That's what Jackwwg83 found in #997 (379 MiB free after load, fails when 7-8 slots decode together,--vram-reserve-mib 1700avoids it). The one-request windows captured on first use (2-5 tokens) hit the same wall asverify: instantiate: out of memory.Now an instantiate that runs out of VRAM frees the least recently used batch layouts' graphs (never the layout being captured) and tries again. A freed layout is captured again when it comes back. While everything fits nothing is freed, so the default path doesn't change. The
--batch-mtplimit goes through the same eviction helper now. I also fixed the batch commit graph's message, which saidverify: batch commit capture: no errorwhen its instantiate failed.Measured on an L40S (46068 MiB, sm_89, Linux), IQ2_XS, setup's config plus
"parallel": 8, 12 clients sending random short prompts with randommax_tokensfor 7 minutes. For the low-free-VRAM case in the issue, another process held 12000 MiB before the engine started, so the cache sized itself to ~440 MiB free:So the plain 48 GB setup was a few more layouts away from the same crash. Three fixed waves of 8 concurrent requests at temperature 0 gave the same 24 replies byte for byte on main (two runs) and on this PR. The per-layout MiB come from a debug-only log line (free VRAM after each capture) that isn't in this PR.
Not tested: Windows, HIP (
cudaErrorMemoryAllocationmaps tohipErrorOutOfMemorythere),--batchon a layer split, and--batch-mtp(its eviction only moved into the helper). It also doesn't touch #1102, which applies cleanly on top.Fixes the batch instantiate crash from Jackwwg83's comment in #997. The original report there (RTX 3090, 360 MiB free) may be the same thing, but I can't tell without its ERR line.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.