Repository navigation
[Attention] Add FlashInfer XQA decode support on SM12x - #49718
Conversation
|
This pull request has merge conflicts that must be resolved before it can be |
Use FlashInferβs dedicated XQA API on SM90 and SM12x. Enable uniform and ragged speculative decode, non-causal draft masks, attention sinks, and uniform-batch CUDA graphs. Pin FlashInfer 0.6.16, which provides the required public API. Assisted-by: OpenAI Codex Signed-off-by: Andrii Skliar <askliar@nvidia.com>
68a4297 to
69bdc0c
Compare
FlashInfer fixed the FP8-Q sliding-window prefill hang in vllm-project#3682, and the fix is included in the pinned dependency. Assisted-by: OpenAI Codex Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Account for CUDA-graph padding in ragged XQA offsets, vectorize draft masks, keep DCP graph support conservative, and validate native sink prefill. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Keep CUDA-graph padding as zero-length ragged requests and require an exact token product before using uniform XQA metadata. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Andrii Skliar <askliar@nvidia.com>
SM12x NVFP4 integration noteThis PR's SM12x XQA routing and the NVFP4 enablement in #49818 are complementary, but they overlap in The current revision here enables XQA for SM90/SM12x only when The accompanying claim that XQA does not support NVFP4 KV needs narrowing. FlashInfer 0.6.15's XQA implementation has an SM120 NVFP4-KV path. #49818 carries the additional vLLM-side pieces required to reach it safely:
That layout point is load-bearing on RTX 5090: current-main gates without it produced token-id-0 collapse 5/5, while changing only the NVFP4 layout produced 5/5 correct; the resulting branch also passed 8/8 concurrency with a 13,158-token needle. The fuller masked-XQA validation behind #49010 passed 3/3 cold and 3/3 cached ~31k needles under true FULL MTP, with mask rows Suggested split: keep this PR as the generic XQA API/mask/cudagraph foundation, then rebase/compose #49818's distinct SM120 NVFP4 contract and layout changes on top. I can run the integrated revision on RTX 5090 once the required FlashInfer 0.6.16 artifacts are available. Related root-cause trail: #49010, #49011, #49818. Disclosure per AGENTS.md: this diff audit and comment were AI-assisted. The cited hardware runs and measurements were produced and verified by me. |
|
This pull request has merge conflicts that must be resolved before it can be |
β¦project#49718)" This reverts commit 1d2d83a.
β¦ SM12x - flashinfer-jit-cache pyproject.toml: add filelock to build-system.requires (build backend imports flashinfer which imports filelock) - Remove Dockerfile system-Python workaround now that pyproject carries it - Revert vllm-project#49718 (XQA decode SM12x) per upstream vllm-project#51987: GPQA eval on DGX Spark produced gibberish (1081 harmony parse errors vs 0 baseline)
β¦-project#49718)" This reverts commit 1d3d8d6.
Replaces the XQA SM12x revert (vllm-project#51987) with the proper fix from vllm-project#52148: when a model has attention sinks on SM12x, route prefill through BatchAttentionWithAttentionSinkWrapper instead of the plain BatchPrefillWithPagedKVCacheWrapper. The original XQA decode path (vllm-project#49718) is restored.
β¦-project#49718)" This reverts commit 74f483d690363647a5d5e2f52c5372ba94f52ae4.
|
Thanks for the XQA + ragged q_cu foundation β we built conditional device/CPU query-length-mismatch support for adaptive verification directly on top of it (SM120, validated locally): details and measurements in our comment on #51303, branch here. |
β¦49718) Signed-off-by: Andrii Skliar <askliar@nvidia.com> Signed-off-by: Andrii Skliar <andreyws96@gmail.com> Co-authored-by: Andrii Skliar <askliar@nvidia.com> Co-authored-by: OpenAI Codex <codex@openai.com>
Summary
Enable FlashInfer XQA decode on SM120/SM121 through FlashInfer's dedicated XQA API.
q_len_per_reqandq_cu_seq_lens.Dependency
This PR requires FlashInfer 0.6.16.post1, which includes the required upstream support from flashinfer#4137 and flashinfer#4199. The Python, cubin, and CUDA-specific JIT-cache artifacts are available in the release.
Scope
This is not a duplicate of #47306 or #37592. Those drafts target the legacy shared decode API and older FlashInfer/base revisions; this PR is limited to SM12x and targets the dedicated 0.6.16.post1 XQA API.
SM90 enhancements and SM100 changes are intentionally excluded and will be handled separately.
SM12x NVFP4 KV-cache support is also out of scope and should build on this PR through #49818.
Validation
.venvis absent; no local CUDA runtime is available.decode_backend=xqaand GSM8K at concurrency 64: 0.8764 flexible / 0.8749 strict. A concurrency-1 run exposed the CUDA-graph padding mismatch addressed by the currentq_cu_seq_lenshandling; that fix still needs a post-change GPU rerun.AI assistance was used to prepare this pull request.