Skip to content

Clean up the comments and names under python/sglang/srt/layers - #1047

Merged
merrymercy merged 3 commits into
mainfrom
improve-comments
Aug 12, 2024
Merged

merrymercy merged 3 commits into
mainfrom
improve-comments

Conversation

@merrymercy

@merrymercy merrymercy commented Aug 12, 2024 •

Copy link
Copy Markdown
Collaborator
  • Rename token_attention.py -> decode_attention.py, context_flashattention_nopad.py -> prefill_attention.py
  • Delete the unused linear.py and quantization

@merrymercy
merrymercy marked this pull request as ready for review August 12, 2024 04:59
@merrymercy
merrymercy enabled auto-merge (squash) August 12, 2024 05:00
@merrymercy
merrymercy requested review from Ying1123 and zhyncs and removed request for Ying1123 August 12, 2024 05:00
@merrymercy
merrymercy merged commit fb1f28c into main Aug 12, 2024
@merrymercy
merrymercy deleted the improve-comments branch August 12, 2024 05:54
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
JinyanYi pushed a commit to JinyanYi/sglang that referenced this pull request Jul 27, 2026
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 31, 2026
…a dict the cut swallowed

TWO EMITTERS MADE HONEST, both instances of the sampling trap this campaign has
now hit four times.

`sgl-project#988 LOADBACK` printed the FIRST event and then every 64th, with no suppression
count. Three lines across three ranks were therefore indistinguishable from "one
application per rank" and from "sixty-three per rank that were never printed" --
and a reproducibility run on boot 15 read exactly that ambiguity and could
conclude NOTHING, in either direction. This is the quantity the whole slice is
judged on, so it is now unconditional.

`sgl-project#1042 EXTENT LIFECYCLE` sampled at n<=3 then every 256th. Boot 15's acceptance
window contained ZERO such lines while the log held nine: the window fell
between samples, and a reader would have concluded "the contract was never
exercised". `set` and `retract` are rare and now print unconditionally; only
`hitless_noop` is still sampled, and it prints how many it skipped.

RUFF CAUGHT A REAL BUG, not a style nit: `_SECOND_CONTINUATION_REFUSALS` (F821)
was swallowed by the sgl-project#1046 cut, which deleted the old `_pp_load_back_extent`
body by slicing to the next `def` -- and that module-level line sat inside the
span. The NameError would have fired only on the sgl-project#959 second-continuation
refusal path, i.e. under specific traffic and probably not on the next boot.
Restored with a note. This is the argument for keeping ruff in the loop even
under speed mode: it is not a suite, it is one pass that can fail on exactly the
class a text-slice deletion produces.

check_1042 and check_1045 re-run green; import smoke confirms the restored
ledger.
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