Conversation
tpopp
requested review from
AndreasKaratzas,
dllehr-amd,
hongxiayang,
tjtanaa and
zyongye
as code owners
August 17, 2026 15:14
Contributor
|
pre-commit failed on ruff in vllm/platforms/cpu.py. Lines 184 and 190 are E501 (90 and 98 cols, limit 88), and ruff format wants to rewrite that same file. Can you wrap those two lines, run ruff format on vllm/platforms/cpu.py, and push? |
4 tasks
3 tasks
Builds on vLLM PR vllm-project#46849, which restores fused multi-step draft decode graphs for autoregressive speculative decoding when every attention backend can update step-dependent draft metadata in place. That PR left DeepSeek V4 ROCm sparse SWA disabled because the AMD path also materializes ROCm-specific ragged SWA indices and indptrs. Enable the ROCm DeepSeek V4 AITER SparseSWA metadata builder for fused draft decode by refreshing its ragged SWA representation after the generic dense SWA update. The refresh writes directly into the persistent metadata buffers returned by build(), avoiding temporary ragged flat/indptr allocations so captured HIPGraph replay keeps stable tensor storage addresses. Add focused tests for the direct-to-buffer helper and in-place metadata update. Validation used TP4 on MI355X against patched and control images built from vllm/main@c4e9692. Runtime logs confirmed the patched image used the fused speculator graph path, while control logged fallback because DEEPSEEK_SPARSE_SWA did not support fused multi-step draft decode metadata updates. Smoke, GSM8K, c16, and c128 runs completed with no HIPGraph/cudagraph replay errors, illegal memory access, stale metadata symptoms, or failed benchmark requests. Serve command shape: VLLM_ROCM_USE_AITER=1 SAFETENSORS_FAST_GPU=1 \ vllm serve deepseek-ai/DeepSeek-V4-Flash \ --tensor-parallel-size 4 \ --attention_backend ROCM_AITER_UNIFIED_ATTN \ --compilation-config '{"mode":3,"cudagraph_mode":"FULL_DECODE_ONLY"}' \ --speculative-config '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"ROCM_AITER_UNIFIED_ATTN"}' \ --kv-cache-dtype fp8 \ --distributed-executor-backend mp \ --max_model_len 4096 \ --max-num-batched-tokens 8192 \ --max_num_seqs 256 \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --trust-remote-code Accuracy command shape: lm_eval --model local-completions \ --tasks gsm8k \ --num_fewshot 8 \ --model_args model=deepseek-ai/DeepSeek-V4-Flash,base_url=http://localhost:<PORT>/v1/completions,num_concurrent=16,tokenized_requests=False Accuracy results, full GSM8K 8-shot, no limit: patched flexible/strict: 0.9492 / 0.9500 control flexible/strict: 0.9416 / 0.9424 Benchmark command shapes: vllm bench serve --model deepseek-ai/DeepSeek-V4-Flash \ --dataset-name random \ --random-input-len 512 \ --random-output-len 1024 \ --temperature 0 \ --ignore-eos \ --max-concurrency 16 \ --num-prompts 160 \ --num-warmups 16 vllm bench serve --model deepseek-ai/DeepSeek-V4-Flash \ --dataset-name random \ --random-input-len 512 \ --random-output-len 1024 \ --temperature 0 \ --ignore-eos \ --max-concurrency 128 \ --num-prompts 1024 \ --num-warmups 128 Performance results, output throughput: c16 patched/control: 2000.58 / 1958.82 tok/s (+2.13%) c128 patched/control: 7852.55 / 7751.43 tok/s (+1.30%) Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Tres Popp <tres.popp@amd.com>
tpopp
force-pushed
the
rocm-dsv4-fused-ar-spec
branch
from
September 3, 2026 12:58
7485e34 to
78fae58
Compare
Contributor
Author
|
Branch is updated and pre-commit is fixed. |
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.
Builds on vLLM PR #46849, which restores fused multi-step draft decode graphs for autoregressive speculative decoding when every attention backend can update step-dependent draft metadata in place. That PR left DeepSeek V4 ROCm sparse SWA disabled because the AMD path also materializes ROCm-specific ragged SWA indices and indptrs.
Enable the ROCm DeepSeek V4 AITER SparseSWA metadata builder for fused draft decode by refreshing its ragged SWA representation after the generic dense SWA update. The refresh writes directly into the persistent metadata buffers returned by build(), avoiding temporary ragged flat/indptr allocations so captured HIPGraph replay keeps stable tensor storage addresses. Add focused tests for the direct-to-buffer helper and in-place metadata update.
Validation used TP4 on MI355X against patched and control images built from vllm/main@c4e9692. Runtime logs confirmed the patched image used the fused speculator graph path, while control logged fallback because DEEPSEEK_SPARSE_SWA did not support fused multi-step draft decode metadata updates. Smoke, GSM8K, c16, and c128 runs completed with no HIPGraph/cudagraph replay errors, illegal memory access, stale metadata symptoms, or failed benchmark requests.
Serve command shape:
VLLM_ROCM_USE_AITER=1 SAFETENSORS_FAST_GPU=1
vllm serve deepseek-ai/DeepSeek-V4-Flash
--tensor-parallel-size 4
--attention_backend ROCM_AITER_UNIFIED_ATTN
--compilation-config '{"mode":3,"cudagraph_mode":"FULL_DECODE_ONLY"}'
--speculative-config '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"ROCM_AITER_UNIFIED_ATTN"}'
--kv-cache-dtype fp8
--distributed-executor-backend mp
--max_model_len 4096
--max-num-batched-tokens 8192
--max_num_seqs 256
--tokenizer-mode deepseek_v4
--tool-call-parser deepseek_v4
--trust-remote-code
Accuracy command shape:
lm_eval --model local-completions
--tasks gsm8k
--num_fewshot 8
--model_args model=deepseek-ai/DeepSeek-V4-Flash,base_url=http://localhost:/v1/completions,num_concurrent=16,tokenized_requests=False
Accuracy results, full GSM8K 8-shot, no limit:
patched flexible/strict: 0.9492 / 0.9500
control flexible/strict: 0.9416 / 0.9424
Benchmark command shapes:
vllm bench serve --model deepseek-ai/DeepSeek-V4-Flash
--dataset-name random
--random-input-len 512
--random-output-len 1024
--temperature 0
--ignore-eos
--max-concurrency 16
--num-prompts 160
--num-warmups 16
vllm bench serve --model deepseek-ai/DeepSeek-V4-Flash
--dataset-name random
--random-input-len 512
--random-output-len 1024
--temperature 0
--ignore-eos
--max-concurrency 128
--num-prompts 1024
--num-warmups 128
Performance results, output throughput:
c16 patched/control: 2000.58 / 1958.82 tok/s (+2.13%)
c128 patched/control: 7852.55 / 7751.43 tok/s (+1.30%)