Repository navigation
Enable grouped INT8 sparse attention for four-row verification - #33546
Closed
Akshay Sonawane (apsonawane) wants to merge 1 commit into
Closed
Akshay Sonawane (apsonawane) wants to merge 1 commit into
Akshay Sonawane (apsonawane) wants to merge 1 commit into
Conversation
Add an opt-in maximum-row gate while preserving the two-row default, and extend grouped/vector-staging reference shapes through four rows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 22, 2026
Open
Akshay Sonawane (apsonawane)
marked this pull request as ready for review
October 22, 2026 21:11
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Exact-branch CUDA numerical qualification remains pending, and automated tests do not enable the expanded grouped path.
1 open issue
What changed in this PR
Extends the existing CUDA DynamicSparseAttention grouped INT8 path to support opt-in three- and four-row speculative verification, while preserving the default two-row limit.
Changes:
- Adds
ORT_DSA_INT8_GROUPED_MAX_ROWSwith a supported range of 2–4. - Extends grouped-decode and vector-staging reference cases through four rows.
- Documents eligibility and fresh-process test configuration.
| File | Description |
|---|---|
| onnxruntime/test/contrib_ops/dynamic_sparse_attention_op_test.cc | Adds three- and four-row reference cases. |
| onnxruntime/contrib_ops/cuda/bert/dynamic_sparse_attention_impl.cu | Makes the grouped INT8 row limit configurable. |
| docs/contrib_ops/cuda/dynamic_sparse_attention.md | Documents the opt-in range and testing setup. |
Review effort: Balanced
| "ORT_DSA_INT8_GROUPED_MAX_ROWS must be in [2, 4]."); | ||
| return (parameters.sequence_length == 1 || | ||
| (quantized_cache && parameters.sequence_length == 2)) && | ||
| (quantized_cache && parameters.sequence_length <= max_decode_rows)) && |
Contributor
|
Squashed into #33472 (asonawane/main-ops-sparse-attention-indexer). Closing this stacked PR. |
Tianlei Wu (tianleiwu)
added a commit
that referenced
this pull request
Oct 23, 2026
…d_state_lengths2/3) + max_splits=32 into PR #33472 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3 tasks done
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
Allow the existing grouped INT8 DynamicSparseAttention kernel to handle three- and four-row speculative verification through
ORT_DSA_INT8_GROUPED_MAX_ROWS=4.Base and integration
Incremental PR against
asonawane/main-ops-sparse-attention-indexer, not main: upstream main lacks the prerequisite operators. This is one component of the DFlash2 stack, alongside the INT2 MoE and hyperconnection tuning branches and GenAIasonawane/dflash2-device-pipeline. No model assets, binaries, benchmark/evaluation scripts, or Mobius changes are included.Validation
git diff --checkpasses; changed lines formatted with clang-format.Combined H200 experiment (not an individual-kernel ablation)
INT2 target + FP8 DFlash2, greedy batch one; six-run means from the previously tested private integration:
Peak sampled memory: 59.350 GiB versus 64.322 GiB old-runtime control. These are combined-stack historical measurements, not measurements of this rebased PR in isolation.
Accuracy caveat: paired HumanEval DFlash/same-S4 perturbed-draft control scored 154/164 with exact output parity. Five-problem LiveCodeBench smoke scored 2/5 versus historical MTP 3/5, including a capacity-limited regression. This stack is not yet an accuracy-qualified default.
Companion draft PRs