Repository navigation
[Perf][ROCm][MiniMax-M3.1] Add opt-in parallel decode top-k - #65032
jiacao-amd wants to merge 1 commit into
Conversation
Use runtime shape metadata and fixed merge widths to avoid serving-time shape specialization. Preserve the FlyDSL selector ordering and causal bounds. Co-authored-by: OpenAI Codex Signed-off-by: jiacao-amd <jiahui.cao@amd.com>
|
Thanks for the AgentX table and the ordering checks. Asks:
|
Use runtime shape metadata and fixed merge widths for the NVFP4 indexer. Preserve FlyDSL ordering and causal bounds, with changing-length graph replay tests, recipe opt-in and MI355 kernel CI coverage. Reapply the reviewed vllm-project#65032 patch to main after its base branch was deleted. Co-authored-by: OpenAI Codex Signed-off-by: jiacao-amd <jiahui.cao@amd.com>
Overview
Add an opt-in parallel decode top-16 selector for MiniMax-M3.1 on gfx950, replacing the fixed FlyDSL w26 selector in the NVFP4 indexer.
Superseded by #65267, which targets
mainand includes the review follow-up. This PR was automatically closed when its target branch was deleted.Claims
VLLM_ROCM_MINIMAX_M3_1_PARALLEL_TOPK=1; default off. FP8 indexers, including C4 mono decode, bypass this path.Validation
900 s AgentX: baseline vs top-k only
4× MI355X, TP4, AgentX 1.0.12; 900 s per arm after warmup. Model:
amd/MiniMax-M3.1-Flash-Quark-MXFP4at0a00e0e39fc00499b23efccc18a8ea63fce5c44c. InferenceX #4671 atbed892b82, DSpark K7, synthetic AL 4.04, seed 42.Values are baseline → candidate. p90 interactivity uses
output_token_throughput_per_user.p10; total throughput includes cached input tokens.Run 1 uses
f9f83fb28; the repeats use the same kernel with the renamed flag in eae2f1099. Neither arm includes #62509. Each row is an independent pair.ITL and TTFT (baseline → candidate)
The first C32 repeat reached the 30 s drain limit with one cancelled request and is excluded. The table uses a fresh C32 pair with the same settings.
Configuration and reproduction
Pinned nightly:
vllm/vllm-openai-rocm@sha256:9cef62361792bd9cc621725c3af799993b6a68b6b62e3778dcf9b65ff6fcd872(sourcee0d00e4b8). Both repetitions use this image.C16/C32 use NVFP4 KV/indexer, V2 + DBO and a 32K prefill budget. Both arms include the same text-only DBO startup-guard fix (
supports_multimodal_inputs). C4 uses FP8 KV/indexer, mono decode, an 8K prefill budget and no DBO.Use the corresponding #4671 serving lane. Set
CONCto the table's concurrency andTOKENIZERto the pinned model snapshot:In-tree tests:
.venv/bin/python -m pytest -q tests/kernels/attention/test_minimax_m3_index_topk_decode.py -k parallel_decode— 78 passed. Direct-kernel and host-dispatch comparisons cover exact FlyDSL ordering, ties, NaNs, causal boundaries, query lengths 1/4/8, fused/staged merge and strided outputs. Two-stream graph replays switch the same rows across adaptive/merge boundaries and verify zero counters after every replay. Pre-commit hooks passed.Model evaluation uses real DSpark rejection, C16, 5-shot, greedy decoding, seed 42, reasoning effort low and a 4096-token output limit.
GSM8K smoke (64 questions): 63 → 62 correct (98.44% → 96.88%); invalid answers 0 → 0.
GSM8K full (1,319 questions): 1,267 → 1,264 correct (96.06% → 95.83%); invalid answers 1 → 0.
Details
Small
heads × rows <= 16batches fuse selection and last-arriver merge; larger batches use staged merging. Scratch and counters are isolated by device, stream and shape.The recipe adds opt-in
parallel_topk; MI355 Buildkite kernel CI selects the new tests. Scoreboard enablement targets #4671's C16/C32 NVFP4 lane,zip_override_tp4_dspark7.roles.agg.env: set the flag to"1"in an image containing this patch and the text-only DBO startup fix noted above. Correctness CI does not enable serving; global default-on is not planned. Recipe validation, interactive command checks and documentation discovery passed.Related work: #64130 targets sampling; #55122 changes C++ persistent top-k; #59980 targets index scoring; #64264 prebuilds existing FlyDSL kernels.
AI assistance: OpenAI Codex.
Pull Request Checklist