-
Notifications
You must be signed in to change notification settings - Fork 257
[AMD] [AgentX] dsv4-fp4-mi355x-vllm-agentic-mtp, update image and extend the DP-attention concurrency curve #2590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jiacao-amd
wants to merge
3
commits into
main
Choose a base branch
from
jiacao/dsv4-agentic-mtp-0809-nopatch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+32
−3
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 With DP_ATTENTION=true, --long-prefill-token-threshold 16384 is set larger than --max-num-batched-tokens 8192, making it an inert no-op: vLLM's V1 scheduler caps a request's per-step token count at the threshold before clamping to the token budget, so a threshold above the budget can never bind. This defeats the stated purpose ('long prefills are chunked rather than starving decode'); the sibling recipe dsv4_fp4_b300_vllm_mtp.sh uses the correct inverse relationship (threshold 512 << budget), and this value should likely be similarly small (e.g. 512).
Extended reasoning...
The bug.
benchmarks/single_node/agentic/dsv4_fp4_mi355x_vllm_mtp.sh:374-380sets, underDP_ATTENTION=true:In vLLM's V1 scheduler (
vllm/v1/core/sched/scheduler.py),long_prefill_token_thresholdis applied as a per-step cap on a request'snum_new_tokens, and that cap is applied before themin()withtoken_budget(which derives from--max-num-batched-tokens). Concretely, both the running-request loop and the waiting-request (prefill) loop do:Since
min(min(N, 16384), 8192) == min(N, 8192)for anyN, the 16384 clamp can never be the binding constraint when the budget is only 8192 — it is a pure no-op. This directly contradicts the PR description's stated rationale for adding the flag: "so long prefills are chunked rather than starving decode." As written, a single long prefill still consumes the full 8192-token budget in one scheduler step, which is exactly the decode-starvation scenario the flag is meant to prevent.Proof by walkthrough. Take a request with a 40,000-token prompt.
num_new_tokensis initially computed as the remaining prompt tokens to process this step, e.g.40000(before any budget/threshold clamp).0 < 16384 < 40000is true, sonum_new_tokensis set to16384.num_new_tokens = min(16384, 8192) = 8192.8192— identical to what would have been scheduled with no threshold set at all (long_prefill_token_threshold=0disables the cap entirely, per its own docstring). The 16384 value never had any effect on the outcome for any prompt length, because step 3 always overrides step 2 whenever threshold > budget.Why this isn't caught elsewhere. I checked whether a second mechanism (e.g., classifying a request as "long" against its total prompt length for a concurrent-long-prefill limiter, as one reviewer speculated) exists in this vLLM version that might make the 16384 value meaningful independently of the per-step cap. It does not: grepping the scheduler and scheduler-config modules for
long_prefill/max_long_partial_prefillsturns up only the three call sites above, all of which use the threshold identically as a per-stepnum_new_tokenscap, not a request-classification threshold compared againstnum_prompt_tokens. The field's docstring ("a request is considered long if the prompt is longer than this number of tokens") is a legacy description of intent, but the actual gating logic operates purely on per-step token counts, so the threshold's real effect is exactly what the code does with it — cap the chunk, then get overridden by the smaller budget.Impact. Nothing crashes and the arm still runs —
--prefill-schedule-interval 8provides separate prefill-scheduling cadence throttling, and the sweep measures the arm's throughput regardless of whether this particular flag does anything. But the flag is dead configuration: it does not chunk long prefills any more tightly than--max-num-batched-tokensalready does on its own, so any decode-starvation behavior from long prefills under DP-attention is unmitigated by this addition, contrary to what the PR description claims it does.Fix. Lower
--long-prefill-token-thresholdbelow--max-num-batched-tokens(8192), e.g. to512, mirroring the working pattern in the sibling recipebenchmarks/single_node/agentic/dsv4_fp4_b300_vllm_mtp.sh(--long-prefill-token-threshold 512alongside--max-num-batched-tokens 8192/16384), which is commented there as keeping "decode latency bounded under load."