[diffusion] Refactor utility ownership and document helper placement - #38699
Merged
mickqian merged 4 commits intoSep 10, 2026
Merged
Conversation
mickqian
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
JustinTong0323,
ping1jing2,
sogalin,
wisclmy0611,
yichiche and
zijiexia
as code owners
September 9, 2026 15:12
pllimax
added a commit
to pllimax/sglang
that referenced
this pull request
Sep 10, 2026
* origin/main: (27 commits) [Simulator] Give the OFFLINE/BLOCKING comparison tolerances real headroom (sgl-project#38732) [Config] msgspec.Struct for the config tier (sgl-project#38753) [AMD] ci: move the miles nightlies from rocm700 to rocm10 (sgl-project#37495) [Config] One writer for the declaration stash; no exception to the write seal (sgl-project#38752) docker(xpu): drop redundant setvars.sh from torch_memory_saver RUN (sgl-project#38665) [XPU][Fix] Pack device-pointer tables as uint64 to avoid 64-bit address overflow (sgl-project#35051) [CI] Temporarily disable GB300 tests (sgl-project#38770) [diffusion] feat: spill large tensors over shared memory like numpy arrays (sgl-project#38656) [diffusion] refactor: refactor utility ownership and document helper placement (sgl-project#38699) [NPU]Support GLM5.2 and FP8 DSA&Indexer kvcache for 950 (sgl-project#38250) [CI] Answer unrecognized slash commands instead of skipping silently (sgl-project#38736) [AMD] Parallelize aiter spec-decode KV index building over token blocks (sgl-project#37659) [DSv4] Integrate TRT-LLM DSv4 Attention for SM100/103 (sgl-project#30805) Add Opt-In for GLM-5.3 Flash breakable prefill CUDA graphs (sgl-project#38522) [CI] Install helion 1.4.0 for the KDA Helion kernel tests (sgl-project#38688) [Rust] Gate health on startup warmup completion (sgl-project#37994) [HiCache] Replace skip_lock_node_ids with a segment lock protocol (sgl-project#36848) feat: add optimized Domino rollout to DFlash V2 (sgl-project#36899) [CI] Add /run-full-ci and /run-extra-ci slash commands (sgl-project#38734) [Model] Support GLM-5.3 Flash NVFP4 loading (sgl-project#38621) ...
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Sep 15, 2026
…placement (sgl-project#38699) Co-authored-by: Mick Qian <mickqian@users.noreply.github.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
utils.py: keep shared parsing, process, and precision helpers in focused modules; put single-consumer helpers back with their callers; remove unused wrappers.No CLI flags, deployment defaults, model registry APIs, or ground truths change. Internal utility import paths change without compatibility re-export chains.
Validation
Remote 2x H200, PyTorch 2.13.0+cu130, Diffusers 0.37.0, Transformers 5.12.1:
sglang generate/serve --help: passed. Native tiny-SD3 public API test (64x64, 2 steps, Ulysses=2, replicated vs folded encoders): passed, SSIM 0.994886 / PSNR 43.625576 / MAD 0.771159 between the two encoder modes.Two failures reproduce unchanged on base
ffe98a4279ba6e42d1f87dc4eeb6edb4887b9ea4:test_auto_ltx_original_replaces_component_cpu_offload: the fixture mocks memory but not the GPU name, so H200 selectsresident.test_ipc_matches_nccl_bitwise:AllToAll4Ddoes not increment the IPC exchange counter. The same routing assertion fails on the base.Neither assertion is relaxed here. Other accelerators and full-size model workloads have not been exercised for this refactor.
Change Size
With rename detection disabled: existing production files +540/-1538 lines; new production files 736 lines (mostly relocated code); tests/docs +200/-81 lines. Production code decreases by 262 lines. This is an ownership refactor, not a performance-speedup claim.
CI States
Latest PR Test (Base): ✅ Run #34372606013
Latest PR Test (Extra): ❌ Run #34372605600
Latest PR Test (AMD ROCm 10): ❌ Run #34372605956