[Perf][Attention] Restore Qwen FA3 single-request metadata across S5000 MP bins and DSV4 FlashMLA direct-out on MATE 0.2.8 #383
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 648 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.387
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #383"
general
weight: 0.35
yeahdongcn
Summary
On the current
v0.32.0MUSA stack (mate == 0.2.8.post1,flash_attn_3 == 0.2.8.post1+musa), two attention fast paths silently fell back to their slower paths because their version gates were pinned tomate == "0.2.4"andsm_count == 60:1. Qwen Single-Request FA3 Scheduler Metadata (
vllm_musa/jit_kernel/fa3_metadata.py,vllm_musa/v1/attention/backends/flash_attn.py):- Support
mate0.2.8/0.2.8.post1alongside0.2.4in_has_supported_fa3_scheduler_layout().- Mirror
MATE >= 0.2.8'ssplit_waves = max(ceil_div(num_heads_kv max_num_splits, sm_count), 1)andwave_capacity = sm_count split_wavesinblocks_per_mp(while keepingsplit_waves = 1for0.2.4), caching_use_fa3_wave_capacity()via@functools.cachesoimportlib.metadata.version("mate")is never queried per decode step.- Generalize
sm_countacross all full-card S5000 MP bins{48, 56, 60, 64}while still rejecting 24-core MPX slices.- Regenerate
vllm_musa/patches/module-drift/v1.attention.backends.flash_attn.diff.2. DeepSeek-V4 TP8 MATE Sparse Prefill Direct-Out (
vllm_musa/v1/attention/ops/flashmla.py):- Support
mate0.2.8/0.2.8.post1's updatedsparse_attention_fwd_kernel_model1private TileLang ABI (result_idx == (3, 4, 5)viajit_for_tensor_addressing,prepare_sparse_mla_strided_tensor,validate_token_lengths,validate_prefill_attn_sink,skip_kernel_launch_if_dry_run,tensor_byte_span, andruntime_sm_scale = sm_scale * log2(e)) while preserving0.2.4compatibility and fail-closed fallback to publicflash_mla_sparse_fwd.- Keep full-device
num_mpspersistent blocks onMATE >= 0.2.8's TMA-pipelined kernel while preserving the legacynum_mps // 3partitioning on0.2.4.S5000 Validation Evidence
sh-harbor.mthreads.com/mcctest/vllm:v0.32.0-ph1-5.2.0-torch2.13.0.post1-20261126(torch 2.13.0a0+git2d71ffa,torch_musa 2.13.0.post1+deb14ae,mate 0.2.8.post1,flash_attn_3 0.2.8.post1+musa,flash_mla 0.2.8.post1+musa,MTT S500060-MP, driver5.2.0-server).-
musa_sync check-series,check-series --replay, andverifyagainstvllm@5df63a7203cdb9328d824a27b682e77c7b9928be:222 clean / 257 total / 0 need attention.- On-device
pytest(tests/jit_kernel/test_fa3_metadata.py,tests/test_flashmla_sparse_direct_out.py,tests/test_flash_attn_scheduler_fast_path.py,tests/test_musa.py):155 passed, 0 failed.- 180-case Multi-MP-Bin FA3 Metadata Golden Check (
SM = 60, 56, 48viamp_margin× 10 Qwen geometries ×seq_lenin{1, 64, 65, 384, 385, 4096}):180 / 180exact match againstmate.get_scheduler_metadata, plus CUDAGraph 8-replay bitwise parityPASS.1. Qwen Single-Request FA3 Metadata Cold-Cache Microbenchmark
| Geometry
(Hq, Hkv, D)|SeqLen| Fallbackget_scheduler_metadata+cumsum(ms) | Direct Triton LUT (ms) | Speedup ||---|---:|---:|---:|---:|
|
(12, 2, 128)| 64 / 512 / 2048 / 4096 |0.0404 / 0.0397 / 0.0403 / 0.0382|0.0160 / 0.0158 / 0.0153 / 0.0152|2.51x–2.63x||
(28, 4, 128)| 64 / 512 / 2048 / 4096 |0.0377 / 0.0379 / 0.0396 / 0.0395|0.0149 / 0.0149 / 0.0159 / 0.0154|2.49x–2.56x||
(32, 8, 128)| 64 / 512 / 2048 / 4096 |0.0378 / 0.0374 / 0.0374 / 0.0375|0.0149 / 0.0150 / 0.0150 / 0.0149|2.49x–2.54x||
(64, 8, 128)| 64 / 512 / 2048 / 4096 |0.0379 / 0.0377 / 0.0377 / 0.0383|0.0151 / 0.0150 / 0.0149 / 0.0150|2.51x–2.55x|2. DeepSeek-V4 TP8 MATE Sparse Prefill Direct-Out Cold-Cache A/B (
[S, 64, 512]BF16)| Mode |
SeqLen| Publicflash_mla_sparse_fwd+copy_(ms) | Zero-CopyDirectOut(ms) | Speedup | Bitwise Exact (out,max_logits,lse) ||---|---:|---:|---:|---:|---|
|
single_stream| 256 | 1.0953 | 0.1132 |9.68x|True||
single_stream| 1024 | 1.5677 | 0.5175 |3.03x|True||
single_stream| 2048 | 2.0218 | 0.8970 |2.25x|True||
3stream_ovlp(Q-proj + KV-comp + MLA) | 2048 | 2.2126 | 1.2053 |1.84x|True||
single_stream| 4096 | 3.2824 | 1.8553 |1.77x|True||
3stream_ovlp(Q-proj + KV-comp + MLA) | 4096 | 3.2444 | 2.3456 |1.38x|True||
single_stream| 8192 | 5.2621 | 3.5337 |1.49x|True||
3stream_ovlp(Q-proj + KV-comp + MLA) | 8192 | 5.8105 | 4.5970 |1.26x|True|3. Compiled
vllm serveQwen3-8BTP=1c=1A/B & Subsystem RegressionsQwen3-8BTP=1c=1(FULL_AND_PIECEWISECUDA graphs):-
in=512, out=128: Mean TPOT14.004 -> 13.985 ms(-19 µs/step), Median TPOT13.986 -> 13.967 ms, P99 ITL15.32 -> 14.51 ms, Output throughput70.46 -> 70.52 tok/s.-
in=2048, out=128: Mean TPOT14.271 -> 14.246 ms(-25 µs/step), Median TPOT14.271 -> 14.249 ms, P99 TTFT115.40 -> 111.08 ms, Output throughput66.63 -> 66.74 tok/s.TP=2, compiled):- Dense FA3 (
Qwen3-8B):PASS- Hybrid GDN + FP8 MoE + FA3 (
Qwen3.5-35B-A3B-FP8):PASS- MLA (
DeepSeek-V2-Lite-Chat):PASS