Skip to content

move topk capturers to srt/state_capturer/ - #24450

Merged
hnyls2002 merged 2 commits into
mainfrom
lsyin/state-capturer
May 5, 2026
Merged

hnyls2002 merged 2 commits into
mainfrom
lsyin/state-capturer

Conversation

@hnyls2002

Copy link
Copy Markdown
Collaborator

Move the three capturer files out of layers/ into a new top-level dir srt/state_capturer/ — capture is observability infrastructure (side-effect observers tapping into producer outputs), not a layer (compute component). Aligns with sglang's existing observer modules (eplb/, metrics/, debug_utils/) which all sit at srt/ root.

Moves

layers/topk_capturer_base.py            -> state_capturer/base.py
layers/moe/routed_experts_capturer.py   -> state_capturer/routed_experts.py
layers/attention/indexer_topk_capturer.py -> state_capturer/indexer_topk.py

Why state_capturer/ (not capture/)

capture/ collides with cuda graph capture (get_is_capture_mode, graph_runner.capture()). state_capturer/ keeps the actor-noun form, scopes the data domain ("runtime model state"), and stays distinct from cuda graph terminology.

No behavior change

  • Class names, method names, and call patterns unchanged.
  • Only mv + import path updates across 9 producer/consumer/test files.

@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!

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label May 5, 2026
hnyls2002 and others added 2 commits May 5, 2026 15:30
Co-Authored-By: Yueming Yuan <yym022502@gmail.com>
Co-Authored-By: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com>
Co-Authored-By: Ziang Li <ziangli@umich.edu>
Co-Authored-By: Yueming Yuan <yym022502@gmail.com>
Co-Authored-By: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com>
Co-Authored-By: Ziang Li <ziangli@umich.edu>
@hnyls2002
hnyls2002 force-pushed the lsyin/state-capturer branch from 9a69e1a to 2a6f443 Compare May 5, 2026 22:31
@hnyls2002
hnyls2002 merged commit 08d4c20 into main May 5, 2026
44 of 102 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/state-capturer branch May 5, 2026 22:54
hnyls2002 added a commit to PrinsYin/sglang that referenced this pull request May 6, 2026
PR sgl-project#24450 moved RoutedExpertsCapturer into srt/state_capturer/.
Re-apply the DeepEP attn-tp all-gather override to the new path.

Co-Authored-By: Junrong Lin <33685709+ocss884@users.noreply.github.com>
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
Co-authored-by: Yueming Yuan <yym022502@gmail.com>
Co-authored-by: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com>
Co-authored-by: Ziang Li <ziangli@umich.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant