Skip to content

Move breakable CUDA graph back into model_executor/runner_backend_utils - #30586

Merged
BBuf merged 2 commits into
sgl-project:mainfrom
Oasis-Git:bcg-reset
Jul 9, 2026
Merged

BBuf merged 2 commits into
sgl-project:mainfrom
Oasis-Git:bcg-reset

Conversation

@Oasis-Git

@Oasis-Git Oasis-Git commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Reverts the package relocation from #27436, which hoisted the BCG core out to sglang.srt.breakable_cuda_graph. The full implementation now lives back at
sglang.srt.model_executor.runner_backend_utils.breakable_cuda_graph and the top-level package is removed; all importers are repointed.

Motivation

Modifications

Accuracy Tests

Speed Tests and Profiling

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ⏳ Run #28991132395
Latest PR Test (Extra): ❌ Run #28991132207

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

The srt breakable CUDA graph core returns byte-identical to its state
before sgl-project#27436 (back at
srt/model_executor/runner_backend_utils/breakable_cuda_graph, dedup
support and capture-failure logging restored, top-level
srt/breakable_cuda_graph package removed).

The diffusion BCG feature is kept and adapted to the pre-PR core:
- replay-token machinery moves to
  multimodal_gen/runtime/breakable_cuda_graph/replay_token.py; the mm
  runner stamps a token around each graph.replay()
- tuple-returning attention forwards (UlyssesAttention, used by
  Z-Image) are boxed into an attribute object for the break point,
  since the pre-PR _copy_output copies objects-with-tensor-attrs in
  place but ignores tuples
- layer.py imports repoint accordingly

Verified: core files byte-identical to ead1e49; all consumers
import; GPU capture/replay of a boxed tuple break point produces
fresh outputs on every replay; 16/16 BCG unit tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BBuf
BBuf merged commit 0562ccb into sgl-project:main Jul 9, 2026
120 of 180 checks passed
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
…ls (sgl-project#30586)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants