Repository navigation
[CUDA] Extend paged XQA decode to head size 256 - #32229
Merged
Baiju Meswani (baijumeswani) merged 1 commit intoAug 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends CUDA paged XQA decoding to support head size 256.
Changes:
- Adds FP16/BF16 kernels for INT8 and FP8 caches.
- Extends dispatch, shared-memory checks, and eligibility.
- Adds an INT8 group-size-6 operator test.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
onnxruntime/contrib_ops/cuda/bert/paged_attention.cc |
Enables H256 XQA eligibility. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_loader.h |
Documents H256 support. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_loader.cu |
Adds H256 dispatch and memory queries. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_fp16_int8_256.cu |
Instantiates FP16/INT8 H256. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_fp16_fp8_256.cu |
Instantiates FP16/FP8 H256. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_bf16_int8_256.cu |
Instantiates BF16/INT8 H256. |
onnxruntime/contrib_ops/cuda/bert/xqa/xqa_paged_bf16_fp8_256.cu |
Instantiates BF16/FP8 H256. |
onnxruntime/test/contrib_ops/paged_attention_op_test.cc |
Tests FP16/INT8 group-size-6 dispatch. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Tianlei Wu (tianleiwu)
approved these changes
Aug 24, 2026
Baiju Meswani (baijumeswani)
deleted the
baijumeswani/xqa-paged-hdim256
branch
August 24, 2026 16:58
Baiju Meswani (baijumeswani)
added a commit
that referenced
this pull request
Aug 25, 2026
Addressing open comments from: #32229 (review) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a8d618bb-0feb-4d05-a918-93b6accde1b1
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.
Extend the quantized paged-KV XQA decode path to
head_size=256for FP16 and BF16 activations with INT8 or FP8 KV caches.This enables XQA for models such as Qwen3.8 whose full-attention layers use 24 query heads, 4 KV heads, and head size 256.
SdpaKernel=XQAdispatch.The existing runtime shared-memory check remains authoritative. If an H256 kernel does not fit the device's opt-in shared-memory limit,
PagedAttentionuses the existing fallback path.