mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2861] [CLOSED] generate: STRATA_VRAM_RESERVE_MIB, a VRAM reserve per part #4301
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#4301
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/2861
Author: @gopinath87607
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:vram-reserve-per-part📝 Commits (1)
153cd16generate: STRATA_VRAM_RESERVE_MIB, a VRAM reserve per part📊 Changes
3 files changed (+83 additions, -12 deletions)
View changed files
📝
docs/DETAILS.md(+10 -0)📝
docs/MULTI_GPU.md(+5 -0)📝
src/program/generate.cpp(+68 -12)📄 Description
What this changes
STRATA_VRAM_RESERVE_MIB="100,100,300,300"— an opt-in VRAM reserve per part of a layer split, in the split'sorder, in MiB. Entry 0 is the first card and replaces
--vram-reserve-mib; entry i is the i-th later card andreplaces
--vram-reserve-later-mibfor that card. A shorter list reuses its last number; extra numbers areignored.
STRATA_GLM_RESERVE_MBis accepted as the same knob.Today the flags give the first card its own number and every later card one shared number, which cannot express a
rig whose cards are not the same size or do not hold the same kind of layer.
stage_room()now takes the part'sordinal and prefers the list's entry for it; the split search, the stage sizing, the drafter reservation and the
LOW free-VRAM warning all go through it. When the list is active, the LOW line's suggested fix names the list entry
to raise instead of the flag the list overrides.
The start prints the reserve each part will use:
strata generate: VRAM reserves per part: CUDA0 700 MiB, CUDA1 700 MiB, ... (STRATA_VRAM_RESERVE_MIB)
From the Maya checkout (
project-maya),Glm5Model::pool_reserve(STRATA_GLM_RESERVE_MB).What it leaves alone
Unset,
vram_reserve_parts_mibis empty,stage_room()takes the old flag path, the print block does not run, andits stderr line is absent. The two flags decide exactly as before. This is by construction, not by a measurement.
Measurements
No speedup is claimed; this is a control knob. On the four-way Q8_0 rig this was written for (CUDA0/CUDA1 12 GB,
CUDA2/CUDA3 8 GB), a run's LOW lines showed CUDA1 with 511 MiB, CUDA2 with 388 MiB and CUDA3 with 1,156 MiB free.
CUDA3's one layer held all 512 profiled pairs of its layer, so its free VRAM cannot buy another expert there and
that is the card whose reserve can rise without losing cache. A per-card A/B (same split, same
STRATA_PREFILL_MAX, list against flags) is the test on a given rig; it has not been run.Checks
stage_room()uses the old flags; noprint).
generate.cppis host-only code and this adds no device code; it compiles clean against thisbranch's headers with the build's own flags (
-fsyntax-only; one pre-existing unused-variable warning inunrelated code). The development branch that also carries the change built fully with ninja (nvcc 13.2).
generate.cppcarries no per-backend code, soboth builds compile the same change.
test of whether a given per-card split pays.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.