Skip to content

Size ordinary prefill graphs to quoted checkpoint work - #357

Merged
yatesdr merged 1 commit into
NVIDIA:mainfrom
yatesdr:fix/helios-checkpoint-capacity-shortage
Nov 18, 2026
Merged

yatesdr merged 1 commit into
NVIDIA:mainfrom
yatesdr:fix/helios-checkpoint-capacity-shortage

Conversation

@yatesdr

@yatesdr yatesdr commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

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.

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
@yatesdr
yatesdr merged commit 5d7a3e7 into NVIDIA:main Nov 18, 2026
2 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant