[Diffusion] Make ring admission a backend capability - #33928
Merged
Merged
Conversation
mickqian
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
ping1jing2 and
yichiche
as code owners
August 7, 2026 02:25
Collaborator
Author
|
/tag-and-rerun-ci |
Replace the two name whitelists (USPAttention init's enum check and server_args' string check) with AttentionBackend.supports_ring_rotation: the per-hop online-softmax merge needs the kernel's softmax LSE, so backends declare it instead of call sites naming them. The server-args list stays name-level (it gates before backend classes are importable on every platform) but now mirrors the capability, with a test pinning the two views together. zimage's silent full-sequence gather under ring gets a one-shot warning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mickqian
force-pushed
the
mick/ring-admission
branch
from
August 7, 2026 04:44
f90dc57 to
26d1794
Compare
Collaborator
Author
|
The Fix is up as #33953 (scopes the guard to sequence-parallel runs, where the corruption it guards against actually exists, plus a single-rank regression test). Once that merges, a rebase/rerun here should go green; nothing to change in this PR. |
mickqian
added a commit
to mickqian/sglang
that referenced
this pull request
Aug 8, 2026
…-node merge Three corrections, all traced to PRs merged since this page was drafted: - Ring now supports USPAttention's masked/tail-pad text path and its replicated-prefix/-suffix/-kv-prefix paths (sgl-project#33327) -- covers the joint text+image attention most models use. The page previously said these paths didn't support ring; that's no longer true. - Cross-node launch (--nnodes/--node-rank/--dist-init-addr) is merged (sgl-project#33327), not pending. Kept the honest caveat: only H3 is validated end-to-end across nodes; other models' new ring support is same-node- validated so far. - The legacy stacked-QKV UlyssesAttention set shrank to one user (Wan's VSA variant) after sgl-project#33923 migrated zimage/hunyuanvideo onto USPAttention; reworded from a migration-debt framing to the current, narrower and more precise one (a kernel without softmax LSE, not an unmigrated path). - Fixed a since-reversed default: the page said Q/K/V packing was opt-in (enable_packed_qkv_input_a2a); sgl-project#33667 made single-collective packing the default, and that flag now selects the older stream-pipelined alternative instead. - Ring's backend gate is now a declared capability (supports_ring_rotation(), sgl-project#33928) rather than a hardcoded enum check; reworded to match. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 task
This was referenced Aug 8, 2026
This was referenced Aug 11, 2026
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
…ct#33928) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 2026
…ct#33928) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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
AttentionBackend.supports_ring_rotation(): the ring per-hop online-softmax merge needs the kernel's softmax LSE, so backends declare the capability instead of call sites naming them (same pattern as Derive H3 attention admission from backend capabilities #33707's packed-varlen admission)USPAttention's init gate consults the capability instead of an enum whitelistRING_CAPABLE_ATTENTION_BACKENDSmirroring the capability, with a unit test pinning the two views together so they cannot driftring_degree > 1silently falls back to a full-sequence K/V gather today; that stays correct but now logs a one-shot warning instead of hiding the degradationA backend that gains an LSE-exposing kernel opts into ring by overriding one classmethod — no call-site edits.
Testing
test_ring_admission.py: capability matrix (FA yes, SDPA/base no) + name-list/capability consistency🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ✅ Run #31158987018
Latest PR Test (Extra): ❌ Run #31158986818