[Core] Use FlashInfer workspace sizing helper#46883
Open
lesj0610 wants to merge 21 commits into
Open
Conversation
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
…orkspace-sizing-20260626 # Conflicts: # vllm/v1/worker/gpu_model_runner.py Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
561cfb5 to
733a786
Compare
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
1 task
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
…orkspace-sizing-20260626 Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com> # Conflicts: # vllm/v1/attention/backends/flashinfer.py
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.
Purpose
Use FlashInfer's caller-owned workspace sizing helper when available so vLLM can reserve the workspace size required by FlashInfer attention planning instead of always reserving the default FlashInfer workspace size.
This keeps the existing fallback path intact: if the helper is unavailable or cannot size a particular shape, vLLM still uses FlashInfer's default workspace allocation behavior. The workspace state shared by FlashInfer wrappers now keeps only weak references to wrappers, so profiling-time or temporary wrappers do not stay alive solely because the shared workspace state saw them once.
This PR requires a FlashInfer build that includes flashinfer-ai/flashinfer#3741 for the caller-owned workspace sizing helper. That FlashInfer change has been merged to FlashInfer main, but it is not part of the 0.6.13 release. Until the first FlashInfer release containing it is available and the vLLM pins are bumped to that version, this PR should be tested with a FlashInfer main checkout/build.
AI assistance: Codex was used during implementation and PR preparation; the submitter reviewed the changes.
Test Plan
Test Result
Syntax, lint, format, and whitespace checks:
Result: passed.
Dependency version checks:
Result: JSON validation passed and no FlashInfer 0.6.12 references remain in the checked requirement and Docker paths. The checked paths still pin FlashInfer 0.6.13; those pins need to move to the first FlashInfer release that includes flashinfer-ai/flashinfer#3741 once it is published. Before that release, testing should use a FlashInfer main checkout/build.
Focused CUDA graph profiling test:
Result before the latest reserve-path test additions:
5 passed.After integrating this branch into the serving integration branch, the full CUDA graph memory profiling test file was also run in the built vLLM development environment:
Result:
7 passed.Qwen3.6 long-context nvfp4 serving smoke after integration:
--kv-cache-dtype nvfp4,--max-model-len 32768,--max-num-seqs 64.0.00 MB -> 61.74 MB, then locked at61.740234375MB.834,491tokens.0.83 GiBactual pool,0.85 GiBestimated pool,0.08 GiBpersistent estimate.0.9202, prefix hit rate1.0000, no workspace grow failure or engine fatal error in the server log.Commit hooks passed for the latest cleanup commit, including ruff, format, mypy, SPDX, config validation, and related repository checks.
Not yet verified in this branch:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model. Not needed; this is an internal FlashInfer workspace accounting change.