[bugfix](cp) align max_context_chunk to cp_virtual_block_size#5780
Closed
pisceskkk wants to merge 2 commits intovllm-project:releases/v0.13.0from
Closed
[bugfix](cp) align max_context_chunk to cp_virtual_block_size#5780pisceskkk wants to merge 2 commits intovllm-project:releases/v0.13.0from
pisceskkk wants to merge 2 commits intovllm-project:releases/v0.13.0from
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses a bug in chunked prefill scenarios with context parallelism, where max_context_chunk was misaligned. The fix correctly adjusts self.block_size to be the least common multiple of its original value and cp_virtual_block_size. This ensures max_context_chunk is properly aligned to cp_virtual_block_size, preventing potential assertion errors. The change is logically sound and correctly placed within the context-parallel metadata builder.
…als document (vllm-project#5756) ### What this PR does / why we need it? Align multi-node nightly test paramter with tutorials documents. ### Does this PR introduce _any_ user-facing change? NA ### How was this patch tested? Test locally and nighly e2e multi-node test cases. - vLLM version: v0.13.0 - vLLM main: vllm-project/vllm@2f4e654 --------- Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
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.
What this PR does / why we need it?
In the chunked prefill scenario, CP needs to align the
max_context_chunkto thecp_virtual_block_size, but the current implementation only aligns it to theblock_size. For PD-disaggregation,cp_kv_cache_interleave_sizeis typically set equal toblock_size, in which casecp_virtual_block_size=block_size * dcp_size * pcp_size. Under specific conditions, this can lead to misalignment of certain chunks, subsequently triggering assertion check errors.ref. #5767
Does this PR introduce any user-facing change?
No