Skip to content

[Attention] Fix FlashInfer SM12x prefill with sinks - #52148

Merged
vllm-bot merged 3 commits into
vllm-project:mainfrom
askliar:agent/flashinfer-sm12x-sink-prefill
Aug 13, 2026
Merged

[Attention] Fix FlashInfer SM12x prefill with sinks#52148
vllm-bot merged 3 commits into
vllm-project:mainfrom
askliar:agent/flashinfer-sm12x-sink-prefill

Conversation

@askliar

@askliar askliar commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Use FlashInfer's sink-aware paged prefill wrapper on SM12x when attention sinks are enabled. The generic FA2 prefill path accepts a sinks argument but does not apply it, so #49718 can use XQA for decode while producing incorrect prefill output.

The wrapper is specialized with the active dtypes, head dimensions, sliding window, and softmax scale. DCP, NVFP4, SM90/SM100, and sink-free paths are unchanged.

This is not a duplicate of the automatic revert #51987: that PR removes SM12x XQA support, while this change preserves XQA and fixes the prefill path for sink-attention models on SM12x .

Validation

  • pytest tests/v1/attention/test_attention_backends.py::test_flashinfer_native_prefill_with_sinks -q passing
  • SM12x GPT-OSS model eval fixed and passing
  • Nemotron and Qwen models both working as expected

Signed-off-by: Andrii Skliar <askliar@nvidia.com>
@mergify mergify Bot added the nvidia label Aug 13, 2026
randomvariable added a commit to randomvariable/vllm that referenced this pull request Aug 13, 2026
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.
…iguration

Signed-off-by: Andrii Skliar <askliar@nvidia.com>
@askliar
askliar marked this pull request as ready for review August 13, 2026 12:38

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@LucasWilkinson LucasWilkinson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA Aug 13, 2026
@LucasWilkinson
LucasWilkinson enabled auto-merge (squash) August 13, 2026 13:44
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 13, 2026
@mgoin mgoin added the bug Something isn't working label Aug 13, 2026
@mgoin

mgoin commented Aug 13, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83752 for commit c2fb5a90ae0c.

@stecasta

Copy link
Copy Markdown
Contributor

Validated on DGX Spark (GB10, sm121), same GPU and job, only the patch or backend flag changed.

gpt-oss-20b, GSM8K 5-shot, limit 200:

arm flexible-extract Harmony non-terminal errors
stock 0.000 196
+ this PR 0.875 0
TRITON_ATTN 0.880 0

Non-sink controls, no regression.

Qwen3-8B: 0.87 flexible / 0.82 strict, identical stock and patched.

Nemotron 3.5 Lightning NVFP4 with a DSpark-3 drafter (hybrid mamba plus attention), 200 items:

arm flexible-extract acceptance length (unforced)
stock run 1 0.830 3.29 to 3.34
+ this PR 0.840 3.23 to 3.31

@mgoin

mgoin commented Aug 13, 2026

Copy link
Copy Markdown
Member

dgx spark test passed, merging https://buildkite.com/vllm/ci/builds/83752#019ffbb2-b776-476f-bdd8-128988ec7298

@vllm-bot
vllm-bot merged commit b652ded into vllm-project:main Aug 13, 2026
105 of 109 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in NVIDIA Aug 13, 2026
Alessandra005 pushed a commit to Alessandra005/vllm that referenced this pull request Aug 17, 2026
Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Michael Goin <mgoin64@gmail.com>
Signed-off-by: Alessandra005 <aurib032@fiu.edu>
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Michael Goin <mgoin64@gmail.com>
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Michael Goin <mgoin64@gmail.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nvidia ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants