Repository navigation
docs: update index - #786
Merged
Merged
Conversation
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
amote-i
pushed a commit
to amote-i/sglang
that referenced
this pull request
Dec 8, 2025
* Update pr-test-npu-debug.yml * Update run_suite.py * Update test_ascend_mla_w8a8int8.py * Update test_ascend_llm_models_glm_4_9b_chat.py * Update test_ascend_llm_models_granite_3_0_3b_a800m.py * Update ascend_backend.py * Update test_ascend_llm_models_granite_3_0_3b_a800m.py * Update run_suite.py * Update ascend_backend.py * Update ascend_backend.py * Update run_suite.py * Update ascend_backend.py * Update ascend_backend.py * Update run_suite.py * Update run_suite.py * Update run_suite.py * Update run_suite.py
LinyuanLi0046
added a commit
to LinyuanLi0046/sglang
that referenced
this pull request
Jun 15, 2026
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 20, 2026
…ver allocates
Boot 735-standT refused the full per-card VRAM reserve with nine unbounded
terms. Three of them were PHANTOM:
NCCL communicator buffers on <card>: ... NCCL-owned group(s): pp
(should_build_pynccl(use_pynccl=True, world_size=3,
barlink_active=False) is True), flip_tp (...), flip_dcp (...)
while the same boot log recorded, for all four groups:
barlink enabled for group 'pp:0': requested=bar1, ACHIEVED=bar1
Barlink owned every group, so no PyNccl communicator was constructed and
those buffers were never allocated. A refusal is not a warning -- it costs
the ENTIRE priced reserve, which is why the corridor verdict has been
reporting net == raw and inventing no posts.
ROOT CAUSE: an ordering defect introduced by sgl-project#781. parallel_state.
should_build_barlink (parallel_state.py:489) is
`bool(envs.SGLANG_BARLINK.get()) and world_size > 1`, and the ledger's NCCL
term calls it at argument-parse time. Before sgl-project#781 the boot script exported
that variable, so it was true when the ledger ran. sgl-project#781 made --barlink the
source of truth and the environment an internal detail this process
publishes from its own argv -- but the publish sits in
_handle_environment_variables (__post_init__ line ~6892) while the ledger
runs in _handle_gpu_memory_settings (~6745). The ledger read an unset
variable and concluded every group builds NCCL.
Same shape as the sgl-project#596 defect already documented inside
ledger_full_demand_per_gpu: a value the ledger reads, resolved after the
ledger reads it. Same remedy: resolve it first.
FIX: _publish_barlink_ownership_env, hoisted ahead of the ledger-bearing
calls. Deliberately NOT a hoist of _publish_promoted_781_flags itself -- the
first version of this change did that, and the test caught it: that method
is 145 lines and also resolves debug-cuda-graph and custom-all-reduce,
including a self.debug_cuda_graph assignment, so the "idempotent publisher"
claim was false and the blast radius far exceeded the defect. The full
publisher now delegates to the same helper, so there is one definition and
the early and late values cannot diverge.
SECOND DEFECT, the ghost remedy. The graph-capture refusal instructed the
operator to run `ingest-boot-log` against a boot log containing the
'Capture ... begin' lines. No such CLI exists anywhere in this tree; grep
over mem_ledger/, rigmon/ and scripts/vram_ledger/ finds only the string
itself. An error message prescribing a command that does not exist is a
silent falseness: the one remedy needing no GPU was unimplemented, which is
a plausible reason these terms sat unpriced for so long. The message now
names the mechanism that does exist (probe_activation.py and the per-rank
phase_footprint_rank<N>.json it writes). Implementing a boot-log ingester
remains open; it is not claimed here.
Tests: test/registered/unit/mem_ledger/test_ledger_phantom_nccl_786.py, 6
pass. The ordering guard is can-fail proven by removing the hoist (3 fail).
The ghost-remedy guard is selected BY SHAPE -- every scripts/*.py path any
ledger message prints must resolve on disk -- so the next invented remedy is
caught too, not just this one. 520 pass across test/registered/unit/
mem_ledger/. ruff: 358 errors in server_args.py before and after, i.e. none
introduced; new files clean.
Not claimed: this retires 3 of the 9 reported terms. The remaining 6 are the
CUDA-graph-capture and runtime-activation footprints on three cards, which
need scripts/vram_ledger/probe_activation.py run for this configuration.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 20, 2026
…ing the weights FOUNDATION SLICE, and it does not yet change any pool size. It removes the one obstacle that made the flip seam's arena tail unknowable at sizing time. WHY THIS TERM MATTERS. The tail is `max(0, layout_pp.total_bytes - layout_tp.total_bytes)` (phase_flip_boot.refill_high_water_bytes) and it binds the KV pool on this rig: 2215 MiB on rank 2 at cut (31,16,17) / vector (32,16,16), which raises that rank's arming floor from 1523 to 3226 MiB and holds the pool at 161378 tokens while the other two ranks could fund 564k and 704k. Today it can only be MEASURED, because `layout_tp` is built in phase_flip_boot:740 from a real TP-shaped worker -- long after the KV pool has been sized. That ORDERING, not the physics, is what forces the two-boot protocol and the cold/warm cliff sgl-project#782 documented: a first boot prices the tail at 0 and sizes 4.4x too large, and every later boot inherits its number from a predecessor. The code already knows the quantity is static; its own docstring says "the leg that must grow is a property of the LAYOUT SIZES". WHAT WAS IN THE WAY. plan_arena_layout needs only metadata -- shape, stride, dtype, storage_offset and the storage SIZE -- and every one of those is correct on a meta tensor, so a meta-device parameter set answers total_bytes exactly, with the same alignment and the same ordering, allocating nothing. Exactly one input is not correct: data_ptr() is 0 for every meta tensor, and that is what the function used to detect aliasing. Fed meta tensors it folded the whole model into ONE slot and returned a total wrong by orders of magnitude and structurally perfect -- a number that would have gone straight into the pool solve. FIX, two halves, both about not guessing: * `alias_of=` supplies the alias relation from the caller (the tie between lm_head and embed_tokens is a property of the checkpoint, known without loading it), and is validated: mismatched views, chains, absent canonicals and unknown names all refuse. * the inference path now REFUSES meta input, and refuses more than one non-empty tensor reporting data_ptr()==0, rather than returning the plausible wrong answer. Tests: test/registered/unit/mem_cache/test_meta_arena_layout_785.py, 9 pass. The acceptance property is byte-for-byte equality -- a meta layout and a real layout agree on total_bytes, slot names, offsets, nbytes and aliases -- since this number is subtracted from a memory budget and a rounding difference is a real difference. The guard is can-fail proven by pricing the bug it prevents rather than asserting it. `alias_of` is exercised on REAL tensors too and must agree with storage inference, so the derived number is the one the runtime later measures. 63 pass across the arena consumers (test_arena_high_water_631, test_weights_arena_exact_pin_695, test_layout_boundary_704) plus sgl-project#782/sgl-project#786. Pre-existing and NOT introduced here: 17 failures across test/registered/unit/model_executor/ and the black ratchet, identical in count and identity with this change reverted; server_args.py and mem_ledger/engine.py were already black-dirty at HEAD. New files are black and ruff clean. NOT CLAIMED: nothing consumes the derived tail yet. Wiring it into the sizing path ahead of the seam-record read, so a cold boot and a warm boot yield the same capacity, is the next slice.
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.
Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help.
Motivation
Please explain the motivation behind this PR and the goal you aim to achieve with it.
Modification
Briefly describe the changes made in this PR.
Checklist
pre-commit run --all-filesor other linting tools are used to fix potential lint issues.