Repository navigation
Size mixed prefill rows to quoted checkpoint work - #389
Merged
Merged
Conversation
Follows up NVIDIA#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). NVIDIA#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.
Size mixed prefill rows to quoted checkpoint work
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.