Upstream sync 2026-05-25 (158 commits) - #101
Draft
Clarit-AI wants to merge 160 commits into
Draft
Conversation
…lanced too (sgl-project#25923) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nc guard, cleanup (sgl-project#25962)
…rwardContext (sgl-project#25983) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e lazy property with init-time capture (sgl-project#26012) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…check stalls (sgl-project#24751) Signed-off-by: abinggo <107740309+abinggo@users.noreply.github.com> Co-authored-by: Yang <ID+Y-aang@users.noreply.github.com>
…e bootstrap fixes (sgl-project#25944)
…for slow tokenizers (sgl-project#25953) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tch (sgl-project#25910) Co-authored-by: Yaochen Han <814073252@qq.com>
…t#25805) Co-authored-by: Ke Bao <ispobaoke@gmail.com>
… FP8 (sgl-project#26057) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ore all-reduce (sgl-project#26394) Signed-off-by: Shangming Cai <csmthu@gmail.com>
…partition is not 16-aligned (sgl-project#22627) Co-authored-by: vguduruTT <venkatesh.guduru@mulitcorewareinc.com>
…ckend (sgl-project#26413) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: sglang-bot <sglang-bot@users.noreply.github.com>
Convert the dangling '# --- BEGIN ENGRAM KHA-390 ---' single-line marker at schedule_batch.py:1294 to the inline ENGRAM_CHANGED form. KHA-390 is closed in Linear; this is settled hygiene. Balances the file (3/2 -> 2/2) and the repo-wide python/ tree (74/73 -> 73/73) so the post-merge BEGIN==END check passes naturally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sync engram fork with sgl-project/sglang upstream/main @ 2b1e53c. origin/main base @ 9d85d45 (advanced from the brief's 46a9f41 via merged hygiene PRs #99/#100; upstream advanced 2aa6995 -> 2b1e53c). Conflicts resolved (4 files; brief anticipated 2 — upstream's ~37 extra commits added scheduler.py and flash_mla.py): - schedule_batch.py: keep ENGRAM conversation_id block + adopt upstream array("q", origin_input_ids) storage (brief §8). - tokenizer_manager.py: keep ENGRAM_MODIFIED header + upstream `from __future__ import annotations` (brief §7). - scheduler.py: adopt upstream's init_output_streamer()/ init_batch_result_processor() refactor; relocate the two ENGRAM kwarg blocks (send_to_tokenizer = M3 output routing, snapshot_hook_manager = M2 hook) into the new helper methods. Dependency ordering verified safe (init_ipc_channels L421, init_snapshot_system L507 precede the calls). - flash_mla.py: keep ENGRAM_MODIFIED header + upstream `import dataclasses`. Preflight: converted the dangling KHA-390 marker in schedule_batch.py to the inline ENGRAM_CHANGED form (separate commit) before the merge. Marker balance: python/ 30/73/73 (balanced); broad 336/338 residual is pre-existing .engram/SYNC_PLAYBOOK.md documentation prose (identical on origin/main), not a merge defect. Awaiting GPU validation (validate-sync.sh) and version tag before ready. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Upstream sync — 2026-05-25
Merges
sgl-project/sglangupstream/main@2b1e53c98into the Engram fork.origin/main@9d85d453bupstream/main@2b1e53c98Conflict resolution (4 files)
python/sglang/srt/managers/schedule_batch.pyconversation_idblock and adopt upstreamarray("q", origin_input_ids)storage.python/sglang/srt/managers/tokenizer_manager.pyENGRAM_MODIFIEDheader and add upstreamfrom __future__ import annotations.python/sglang/srt/managers/scheduler.pysgl-kernel/python/sgl_kernel/flash_mla.pyENGRAM_MODIFIEDheader and add upstreamimport dataclasses.scheduler.py forward-port note
Upstream refactored the inline construction of
output_streamer/batch_result_processorout of__init__into two new helper methods,init_output_streamer()andinit_batch_result_processor(). This collided with two ENGRAM kwarg injections. Resolution: adopt upstream's extracted-method structure, and relocate the two ENGRAM kwargs into the new method bodies:send_to_tokenizer=self.ipc_channels.send_to_tokenizer(M3 stateful-generate output routing) → now atscheduler.py:1755snapshot_hook_manager=self.snapshot_hook_manager(M2 hook) → now atscheduler.py:1782Runtime-ordering verified safe statically: the relocated reads execute when⚠️ Validate at Phase 3b test #1 (server startup) and #5 — an AttributeError here would only surface at runtime, not in
init_output_streamer()/init_batch_result_processor()are called (in__init__), and both dependencies are assigned earlier —init_ipc_channels()at L421 andinit_snapshot_system()at L507, both before the L630/632 call site.py_compile.Marker accounting (for reviewers / CodeRabbit / Codex — do not re-flag)
BEGIN ENGRAM/END ENGRAM= 336 / 338. The −2 is entirely pre-existing example markers in.engram/SYNC_PLAYBOOK.md(2 BEGIN / 4 END) — documentation prose describing the marker convention, not code markers. Identical onorigin/main; untouched by this merge. Independently flagged as benign in the 2026-05-25 sync report.python/= 73 / 73; every individually merged file balances.KHA-390marker inschedule_batch.pywas converted to the inlineENGRAM_CHANGEDform in a separate commit before the merge (KHA-390 is closed).Phase 3b validation checklist (post-GPU, before ready)
scripts/validate-sync.sh— all 6 tests pass (incl. test Implement startup snapshot warm restore #6 contract-conformance)snapshot_hook_managerwiring)Local quality gates (CPU-only, this checkout)
py_compile: all 4 modules pass (syntax-only; no CUDA/torch init)🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ❌ Run #26477063450
Latest PR Test (Extra): ❌ Run #26477086339