Skip to content

[Diffusion] Make ring admission a backend capability - #33928

Merged
mickqian merged 3 commits into
sgl-project:mainfrom
mickqian:mick/ring-admission
Aug 7, 2026
Merged

mickqian merged 3 commits into
sgl-project:mainfrom
mickqian:mick/ring-admission

Conversation

@mickqian

@mickqian mickqian commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add 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 whitelist
  • server_args' string-level list stays (it gates before backend classes are importable on every platform) but is centralized as RING_CAPABLE_ATTENTION_BACKENDS mirroring the capability, with a unit test pinning the two views together so they cannot drift
  • zimage under ring_degree > 1 silently falls back to a full-sequence K/V gather today; that stays correct but now logs a one-shot warning instead of hiding the degradation

A 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
  • full unit suite for server_args passes (2x B200)

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ✅ Run #31158987018
Latest PR Test (Extra): ❌ Run #31158986818

@mickqian

mickqian commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

mickqian and others added 2 commits August 7, 2026 12:42
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
mickqian force-pushed the mick/ring-admission branch from f90dc57 to 26d1794 Compare August 7, 2026 04:44
@mickqian

mickqian commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

The multimodal-gen-test-2-gpu (0) failure here is a fast-fail cascade, not this PR: its root-cause job is component-accuracy, which is currently red on main#33923 merged with a masked-path guard that also refuses legal single-rank calls, so qwen's whole 1-GPU masked family raises NotImplementedError on every branch cut after it.

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
mickqian merged commit 13938fe into sgl-project:main Aug 7, 2026
124 of 136 checks passed
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>
saturn-acc pushed a commit to saturn-acc/sglang that referenced this pull request Aug 16, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant