mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1417] [CLOSED] prefill: scope each split-stage loan estimate to its device #3440
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#3440
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/1417
Author: @imanu86
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr/split-prompt-borrow📝 Commits (1)
4f9f148OPUS-PORT-Stima il prestito del prompt sul device del proprio blocco📊 Changes
2 files changed (+5 additions, -1 deletions)
View changed files
📝
src/prefill/prefill.cpp(+2 -1)📝
src/program/generate.cpp(+3 -0)📄 Description
A layer-split prompt borrows buffers from each stage's expert cache. This makes the
part_slotsestimate run underOnDevice(p.dev), matching the device scope used byPrefill::initand the other prompt-buffer estimates. When initialization fails inside a borrowed region, the diagnostic also reports that region's capacity.This is a small consistency change, not a demonstrated fix for a failure in current upstream. At upstream
d5ea7133741e67743c0e886bb426c0ce8d69cf6c, CUDAprompt_f16()is always false and the HIP setting is process-wide, so these devices currently produce the same count. The added scope makes the existing contract explicit before device-specific buffers are introduced.The motivating failure occurred in our fork, which has extra Turing-only prompt buffers: RTX 3060 as the first stage and RTX 2080 Ti as the last stage, on Windows. The later stage's loan was undercounted even though free VRAM remained. Those fork-specific buffers are not part of this PR, and their successful run is not validation of this exact upstream branch.
Validation and scope:
pr/split-prompt-borrow, head4f9f14892da9e9d401dd7f6360e71b311912858a, one commit over82f46a8c8f475f001ad76d92f58f4a4f8ffb0253.git diff --check 82f46a8..HEADpasses. Read-only inspection against current upstream confirms neither addition is present there.OnDevicerestores the previous device when the count ends.Suggested validation is to compare prompt loan sizes and successful prompt ingestion before/after on an ordinary layer split. Reproducing the original undercount requires device-specific allocation differences, which current upstream does not have.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.