Skip to content

[MUSA] Enable TTS predictor graphs - #2168

Merged
Ratish1 merged 8 commits into
sgl-project:mainfrom
yingzhou-bjtu:upstream-pr1-musa-common
Sep 21, 2026
Merged

Ratish1 merged 8 commits into
sgl-project:mainfrom
yingzhou-bjtu:upstream-pr1-musa-common

Conversation

@yingzhou-bjtu

@yingzhou-bjtu yingzhou-bjtu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

MUSA currently disables Qwen3-TTS predictor Graphs by overriding
enable_tts_predictor_graph() to False. CUDA already inherits the
OmniPlatform default (True). This PR deletes that override.

Modifications

  • Delete MUSAOmniPlatform.enable_tts_predictor_graph() -> False.
  • Assert the MUSA default in tests/unit_test/test_platforms.py.

This PR is based on main.

Related Issues

Native Graph RNG fix; torch_musa 2.11.0.post2 already supports this:
yingzhou-bjtu/torch_musa#1

Qwen3-TTS MUSA device-path adaptation:
#2167

Accuracy Test

N/A. The change is a platform default.

Benchmark & Profiling

N/A.

Validation

Static checks at head ad727542:

pre-commit --files sglang_omni/platforms/musa.py tests/unit_test/test_platforms.py
git diff --check origin/main...HEAD

Both passed.

Checklist

  • Format your code according with pre-commit.
  • Add unit tests.
  • Update documentation / docstrings / example tutorials as needed.
  • Provide throughput / latency benchmark results and accuracy evaluation results as needed.
  • For reviewers: If you haven't made any contributions to this PR and are only assisting with merging the main branch, please remove yourself as a co-author when merging the PR.

CI

CI runs on self-hosted GPU runners and requires a maintainer to add the
run-ci label. Once labeled, every subsequent push re-triggers CI as
long as the label remains. Use /tag-and-rerun-ci higgs or
/tag-and-rerun-ci moss or /tag-and-rerun-ci qwen3-tts to select a TTS CI
model, and
/tag-and-rerun-ci fun-asr, /tag-and-rerun-ci qwen3-asr or
/tag-and-rerun-ci whisper-asr to select an ASR CI model. One selector from
each family can be combined, for example /tag-and-rerun-ci moss fun-asr.
Draft PRs are skipped even if labeled.

Comment thread sglang_omni/model_runner/sglang_model_runner.py Outdated
Comment thread sglang_omni/vendor/sglang/layers.py Outdated
Comment thread sglang_omni/models/qwen3_tts/sglang_model.py Outdated
Comment thread sglang_omni/model_runner/base.py Outdated
@yingzhou-bjtu

Copy link
Copy Markdown
Contributor Author

/tag-and-rerun-ci

@yingzhou-bjtu
yingzhou-bjtu force-pushed the upstream-pr1-musa-common branch from 254505f to fc7b40e Compare September 17, 2026 06:39
codex added 5 commits September 18, 2026 14:39
Keep current main's predictor graph backend. Wrap MUSA capture/replay
in inference mode, read runner config from server_args before runtime
context is published, and stop disabling MUSA predictor graphs.
Keep the current-main graph backend rebase, and apply the existing
fork PR1 comment/import cleanup so capture comments sit next to the
MUSA inference-mode guard.
MUSA graph replay leaves logits as inference tensors. Wrap execute,
launch, and resolve in inference mode so codec suppress can write
those logits in place, and allocate pinned host staging outside
inference mode so later host copies stay valid.
Keep the MUSA execute path in inference mode and assert host staging
stays an ordinary tensor after execute returns.
Restore the capture decorator so CUDA stays on no_grad while MUSA still
enters inference mode through capture_mode. Collapse duplicated host
staging allocation and sign the constructor comment.
@yingzhou-bjtu
yingzhou-bjtu force-pushed the upstream-pr1-musa-common branch from fc7b40e to 18d9b12 Compare September 18, 2026 10:25
Comment thread sglang_omni/model_runner/sglang_model_runner.py Outdated
Comment thread sglang_omni/vendor/sglang/layers.py Outdated
Comment thread sglang_omni/model_runner/base.py Outdated
Comment thread sglang_omni/model_runner/sglang_model_runner.py Outdated
Comment thread sglang_omni/model_runner/base.py Outdated
Comment thread sglang_omni/model_runner/base.py Outdated
Comment thread sglang_omni/models/qwen3_tts/sglang_model.py Outdated
Comment thread sglang_omni/model_runner/sglang_model_runner.py Outdated
codex added 3 commits September 20, 2026 15:27
Keep Omni-owned MUSA pieces: predictor graph enablement, constructor
server_args reads, and the float32 RMSNorm native fallback. Graph RNG
capture_begin now belongs in torch_musa, so Omni no longer wraps
capture, replay, or execute in inference mode.
ModelWorker publishes server_args before constructing SGLModelRunner, so
keep get_parallel() and get_schedule() as on main. Raw server_args can
miss the derived mem_fraction_static after encoder reserve.
@yingzhou-bjtu yingzhou-bjtu changed the title [MUSA] Keep graph execution in inference mode [MUSA] Enable TTS predictor graphs Sep 21, 2026

@yeahdongcn yeahdongcn left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ratish1
Ratish1 merged commit fbb486a into sgl-project:main Sep 21, 2026
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants