Repository navigation
Size ordinary prefill graphs to quoted checkpoint work - #357
Merged
yatesdr merged 1 commit intoNov 18, 2026
Merged
Conversation
Follow-up to NVIDIA#354. Prefill candidates are scored with a checkpoint estimate that skips the snapshot-storage quote, and the submitted lane uses the quoted selection. When storage is short, the quoted selection can drop or move the estimated cut, so a lane submitted different work than its graph capacity was chosen for: a 200-token prompt ran as 128 tokens on a 128-token graph, chunking prefill exactly when checkpoint storage is full. Before materializing an ordinary prefill plan whose quoted work differs from its estimate, pick the smallest catalog capacity covering the quoted work and recompute duration and value with the lane prices the selection already holds. The prefill value formula is shared through lane_value_for_tokens. A missing duration or catalog entry keeps the candidate and clips its work, as before. Refresh and discovery plans keep their selected shapes, so a refresh still measures its target. With storage exhausted, a 200-token prompt now runs as 200 tokens on a 256-token graph; with sufficient storage nothing changes. A resized plan can run longer, up to the chunk-size graph, and is not re-compared with other candidates. Mixed plans keep the old clip, a known remaining gap. The shortage regression (200, 300 and 1,024-token prompts and an unchanged refresh target, with every snapshot slot held) fails on abd5646 and passes with the fix. A fallback test checks that a missing duration leaves the candidate unchanged. Not tested: GPU serving with snapshot storage exhausted. Design-Signed-Off-By: yatesdr; design-review=ed22
20 tasks done
yatesdr
added a commit
that referenced
this pull request
Nov 19, 2026
Follows up #357. When checkpoint storage is short, the quoted cut can move past the estimated one used to choose a mixed graph (prompt prefill combined with decode or verification rows, from packages exported with --mixed-prefill). #357 resized ordinary prefill plans to the quoted work; mixed plans kept their prompt capacity and the quoted work was clipped to it, so the prompt row ran short and was finished in another step. Apply the same resize to a mixed plan's prompt row: pick the smallest mixed shape with the plan's batch and decode width whose prompt capacity covers the quoted work, and recompute the duration and the combined prompt and decode value. Decode rows, refresh and discovery plans are unchanged, and a shape without a measured duration keeps the plan as on main. The regression schedules a 200-token prompt as 200 tokens on a 256-token mixed shape; main runs 128 tokens on a 128-token shape. It also covers 300- and 1,024-token prompts (the latter bounded by the 512-token catalog maximum), ordinary and speculative decode rows and the missing-duration fallback. It fails on main and passes with the fix (Linux aarch64). On cn4 (Linux x86_64, release) the scheduler and runtime phase tests pass: 426 passed, 4 ignored. Not tested: serving on a --mixed-prefill package, scored prefill or image spans under shortage, more than one decode row. Design-Signed-Off-By: yatesdr; design-review=1af4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #335. Follow-up to #354 from its final review.
Size ordinary prefill graphs to quoted checkpoint work
Follow-up to #354. Prefill candidates are scored with a checkpoint
estimate that skips the snapshot-storage quote, and the submitted lane
uses the quoted selection. When storage is short, the quoted selection
can drop or move the estimated cut, so a lane submitted different work
than its graph capacity was chosen for: a 200-token prompt ran as 128
tokens on a 128-token graph, chunking prefill exactly when checkpoint
storage is full.
Before materializing an ordinary prefill plan whose quoted work differs
from its estimate, pick the smallest catalog capacity covering the
quoted work and recompute duration and value with the lane prices the
selection already holds. The prefill value formula is shared through
lane_value_for_tokens. A missing duration or catalog entry keeps the
candidate and clips its work, as before. Refresh and discovery plans
keep their selected shapes, so a refresh still measures its target.
With storage exhausted, a 200-token prompt now runs as 200 tokens on a
256-token graph; with sufficient storage nothing changes. A resized plan
can run longer, up to the chunk-size graph, and is not re-compared with
other candidates. Mixed plans keep the old clip, a known remaining gap.
The shortage regression (200, 300 and 1,024-token prompts and an
unchanged refresh target, with every snapshot slot held) fails on
abd5646 and passes with the fix. A fallback test checks that a missing
duration leaves the candidate unchanged.
Not tested: GPU serving with snapshot storage exhausted.
Linux (cn4): scheduler:: and server::runtime::phase_tests, 422 passed.