Repository navigation
[Perf][GDN] Skip FLA chunk metadata when FlashInfer GDN prefill is active - #61569
Merged
Merged
Conversation
FlashInfer's GDN prefill kernel consumes cu_seqlens directly and never reads chunk_indices/chunk_offsets, but the metadata builder still ran prepare_chunk_indices/prepare_chunk_offsets (CPU compute plus H2D copies) for every prefill batch. Skip building them for the flashinfer backend, matching the existing aiter_flydsl exemption. Co-authored-by: Kimi Code <noreply@moonshot.cn> Signed-off-by: Thien Tran <gau.nernst@yahoo.com.sg>
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #94686 for commit |
ZJY0516
approved these changes
Oct 14, 2026
Contributor
Author
|
/ci retry |
|
✅ Triggered Buildkite CI #94708 for commit |
ZJY0516
enabled auto-merge (squash)
October 14, 2026 08:19
khluu
disabled auto-merge
October 14, 2026 08:46
6 tasks done
AndreasKaratzas
pushed a commit
to AndreasKaratzas/vllm
that referenced
this pull request
Oct 16, 2026
…tive (vllm-project#61569) Signed-off-by: Thien Tran <gau.nernst@yahoo.com.sg> Co-authored-by: Kimi Code <noreply@moonshot.cn> Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
…tive (vllm-project#61569) Signed-off-by: Thien Tran <gau.nernst@yahoo.com.sg> Co-authored-by: Kimi Code <noreply@moonshot.cn>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Skip building FLA chunk metadata (
prepare_chunk_indices/prepare_chunk_offsets+ two H2D copies per prefill-containing step) when the FlashInfer GDN prefill backend is active — the FlashInfer wrapper consumes onlycu_seqlensand never reads them. Same exemption as the existingaiter_flydslpath. 4-line change, no behavioral difference.Claims
gdn_prefill_backend=flashinfer(auto default on SM90, and SM100/SM120 withhead_k_dim=128). With MTP this covers mixed steps too (non-spec 1-token decodes are reclassified into the chunk-kernel path).fi_chunk_gated_delta_rulehas nochunk_indices/chunk_offsetsparameters.Validation
pytest tests/v1/attention/test_gdn_metadata_builder.py -q: 61 passed.FLA_CHUNK_SIZE=64): 3.5-5.4 µs CPU + 1.0-64.5 KiB H2D per step for 1-64 seqs x 8k tokens.Flat within noise, as expected for ~5 µs/step of host work against ~150 ms TTFT.
Details
Duplicate-work check: nearest open PRs inspected by diff — #60050, #61034, #60105, #57039; none skip the chunk-metadata build. Verified compatible with #60050 (FlashInfer prefill checkpoints) in either landing order: its checkpoint path calls
fi_chunk_gated_delta_ruledirectly without chunk indices, and its fallback branch only passes them through the dispatch wrapper, which the FlashInfer backend ignores.No accuracy eval: nothing in the change can affect outputs (see Claims); the e2e run above exercised the modified path at c1-64.
AI assistance was used in the creation of this PR.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.