Skip to content

attn: enable Split-K for mix-batch decode rows - #485

Open
krisclarkdev wants to merge 7 commits into
vllm-project:mainfrom
krisclarkdev:perf/mixbatch-decode-splitk
Open

attn: enable Split-K for mix-batch decode rows#485
krisclarkdev wants to merge 7 commits into
vllm-project:mainfrom
krisclarkdev:perf/mixbatch-decode-splitk

Conversation

@krisclarkdev

Copy link
Copy Markdown
Contributor

Purpose

Enable Split-K on the mix-batch decode half in csrc/flash_attn/flash_api.cpp (was hardcoded num_kv_splits=1). Pure-decode already uses get_num_splits; chunked-prefill serving left long-KV decode rows single-split.

Related: group splitkv (#337), small-q_len Split-K route (#455). As of 2026-07-24, main still hardcodes mix-batch num_kv_splits=1.

Test Plan

  • Focused accuracy (interleaved + decode)
  • Mix-batch micro A/B vs 28-arg base FA2
  • Split probe (estimate_get_num_splits > 1)
  • Serve E2E on Arc Pro B70 (Qwen2.5-7B)

Test Result

Hardware: Intel Arc Pro B70 · Commit: a8a3ccc

Accuracy

20/20 focused (float16/bf16, block64, head64/128).

Micro (attn hot-op vs base FA2)

Shape Δ (higher = better)
mix_long_kv +25.70%
mix_decode_heavy +31.84%
interleaved_short −2.94%

Serve E2E (Qwen2.5-7B-Instruct, bf16, enforce-eager; median of 3 after warmup; failed=0 on primary)

Profile Base tok/s Cand tok/s Δ tok/s Base TPOT ms Cand TPOT ms
Short random 512→128 1518.45 1527.34 +0.59%
Fixed mixkv page64 (1k–6k→512, conc=8) 266.16 266.59 +0.16% 29.82 29.78
Decode-bound prefix_rep page64 273.29 273.27 −0.01% 28.80 28.79

Claim: micro win on long mix-batch; not claiming ≥10% E2E serve tok/s (flat under these recipes).

(Optional) Documentation Update

None.

krisclarkdev and others added 2 commits July 23, 2026 09:05
Chunked-prefill serving left long-KV decode rows with num_kv_splits=1.
Use get_num_splits and allocate the split temporary output so mix-batch
decode can parallelize along K like pure decode.

Signed-off-by: Kristopher Clark <krisclarkdev@krisbox.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
@krisclarkdev

Copy link
Copy Markdown
Contributor Author

Required companion of vLLM FA-in-graph / XPU graphs PR: vllm#50038.

Please treat kernels #485#489 as part of the graphs stack alongside vllm #48677 (torch/image) and #49813 (softcap/MXFP8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant