[Refactor][Attention] Consolidate GQA prefill ops and kernels - #1913
Draft
superAngGao wants to merge 8 commits into
Draft
[Refactor][Attention] Consolidate GQA prefill ops and kernels#1913superAngGao wants to merge 8 commits into
superAngGao wants to merge 8 commits into
Conversation
This was referenced Aug 15, 2026
lcy-seso
force-pushed
the
refactor/gqa-prefill-fp8-goal
branch
from
August 19, 2026 10:47
df8a94b to
4a595c8
Compare
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.
Summary
Consolidate the GQA prefill operator and kernel surface around three data topologies:
GroupedQueryAttentionPrefillDenseFwdOpfor dense BSHD inputsGroupedQueryAttentionPrefillVarlenFwdOpfor packed THD inputsGroupedQueryAttentionPrefillPagedWithKVCacheFwdOpfor paged KV cache and optional appendFull/causal/sliding-window attention, softcap, NeoX/interleaved RoPE, FP16/BF16, FP8 cache storage, and native FP8 compute are selected inside those topology-level Ops instead of being exposed as separate public Ops. This does not add a new manifest schema.
The kernel layer is reorganized accordingly:
Finally, all five GQA forward Ops now use the target seam: external targets receive the exact normalized manifest ABI, while NVIDIA architecture inspection and in-tree kernel selection remain inside builtin factories. External callable memoization is device-aware and bounded.
This broader refactor supersedes #1896, incorporates the applicable FP8 kernel work from the still-open #1873, and covers the contiguous prefill-with-KV-cache functionality proposed in #1879.
Validation
Targeted suites completed on H200:
ruff checkpassed on the changed Python surface before the final upstream-only manifest-label rebase;git diff --checkpasses after rebaseNative-CUPTI measurements on a clock-locked H200 (SM 1500 MHz) confirmed no performance regression across the covered Dense, Varlen, and Paged GQA prefill paths.
This is intentionally a broad draft so the three-topology ABI and the Op-to-kernel ownership boundary can be reviewed before compatibility cleanup is finalized.