Conversation
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Member
|
Closing as stale: no author activity since the last push on 2025-11-26, and the approach is superseded by changes to the AITER FA backend and the DCP opt-in gate added in #55780. |
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
This PR enables Decode Context Parallelism (DCP) support for the ROCM_AITER_FA backend in vLLM, enabling improved performance for decoding operations on AMD GPUs with the AITER Flash Attention implementation.
Test Plan
Evaluation on GSM8K benchmark dataset.
Test Result
With DCP Enabled
Configuration: Qwen/Qwen3-235B-A22B-Instruct-2507 with DCP enabled (TP=8, dcp=2)
Without DCP
Configuration: Qwen/Qwen3-235B-A22B-Instruct-2507 without DCP (TP=8)
Benchmark Result
Performance benchmarking was conducted using
vllm bench servewith the following command:vllm bench serve \ --model Qwen/Qwen3-235B-A22B-Instruct-2507 \ --backend vllm \ --endpoint /v1/completions \ --host localhost \ --port 9099 \ --num-prompts 160 \ --max-concurrency 16 \ --dataset-name random \ --random-input-len <INPUT_LEN> \ --random-output-len <OUTPUT_LEN>Benchmark Setting 1: 2K Input / 1K Output
Configuration: 160 prompts, max concurrency 16, input length 2000, output length 1000
Benchmark Setting 2: 1K Input / 4K Output
Configuration: 160 prompts, max concurrency 16, input length 1000, output length 4000
Performance Analysis
Decode Stage Speculation
The benchmark results show that DCP2 significantly underperforms compared to both DCP1 configurations, particularly in the decode stage (as evidenced by the 4x higher TPOT metrics). Based on the implementation in
rocm_aiter_fa.py, we identify the following performance bottleneck:Root Cause: Incompatibility with Paged KV Cache
The DCP decode path uses
aiter.flash_attn_varlen_func, which requires contiguous KV cache. Since vLLM uses paged KV cache, the implementation must gather cache blocks into contiguous buffers viacp_mha_gather_cacheon every decode step. This involves block table lookups and memory copies from scattered locations.In contrast, the non-DCP path uses
torch.ops.aiter.paged_attention_v1, which works directly with paged KV cache without gathering overhead.The cache gathering overhead outweighs the benefits of decode context parallelism, causing the observed 4x throughput degradation. Future optimization should use a paged attention kernel that returns lse information.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.