Repository navigation
deprecated - #336
Closed
ZhangYuanhan-AI wants to merge 4 commits into
Closed
deprecated#336ZhangYuanhan-AI wants to merge 4 commits into
ZhangYuanhan-AI wants to merge 4 commits into
Conversation
vschandramourya
pushed a commit
to vschandramourya/sglang
that referenced
this pull request
Feb 3, 2026
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 31, 2026
… extended to the native FP4 rank — the sgl-project#332 guard knew only the Marlin form; native lane gets its own condition (n%32 on the SHARDED width where Marlin judges the unsharded one), two verdict moments (get_quant_method unsharded + create_weights sharded with scheme swap before any parameter), native bypass guard so an illegal width can never reach the kernel assert unnamed; Marlin/native asymmetry deliberate and documented (Marlin shard miss stays loud = plan bug; native has no coarsening axis, 6g%32==0 -> g%16==0 proves no TP>1 plan exists on this GDN geometry); card expectation 96 -> 144 with count history in the readout; (2) solo reserve root CORRECTED vs the beleg: not NVML index 0 — get_nvgpu_memory_capacity takes min() over every card the DRIVER lists (nvidia-smi ignores CUDA_VISIBLE_DEVICES), so a UUID-pinned 5090 got the smallest card's 20480; homogeneous rigs never see it; fix reads NVML for the placed cards via the PCI-bus-id bridge, strict refusal instead of identity fallback, two loud errors (unresolvable device, mixed totals under one scalar); the falsifier is its own test: (20480-2048)/20480 = 0.900000 EXACTLY the anchor fraction — the wrong card produced the number being compared against; +30 tests (46/28), 729 green, failure set byte-identical stash-verified; GPU bundle A/B/C for postens 3-5 filed with falsifiable arms (C1 foreign-card-vs-co-tenancy separation, C2 compute-sanitizer, C3 graph-vs-forward) # Conflicts: # docs/dev/INTEGRATION_R3_VALIDATION.md
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 31, 2026
…ED — NEXTN on V4 under uneven TP=3 proven: accept 3.20/3.28/2.72 (mean 3.07) from meta_info, DEQUANTISED exactly 144 (48 per rank, TP0 names sharded width 42-vs-32 — same number that killed the pre-sgl-project#336 run, opposite outcome), dequant lane costs NO pool (max_total_num_tokens identical to anchor), corridor green; script bug fixed in passing (--context-length -1 is a vLLM idiom, sglang assigns it verbatim -> max_req_len=-2 with a misleading pool-size error); ARM B INVERTS the assumption: both TP=1 references (5090 AND 3080) identical with green floors — the LANE matches the reference on all three prompts, the TWO-CARD SERVING GROUP is the deviating side; ARM C: neither co-tenancy nor budget — root is the four lane shells moving activations via _on() without switching the current CUDA device (Triton validates pointers against the ACTIVE context; cuBLAS carries a DeviceGuard from its tensors — why dense bf16 survived and FP8 dies); the beleg's illegal memory access was the scheduler's next stream op on an already-poisoned context; C2/C3 moot; 11 of 35 min
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 2, 2026
…order was guessed Three bridges answered "which physical card is index i". sgl-project#331's IdentityMap (registry/nvml.py) keys cards on their NVML UUID and bridges CUDA ordinal <-> NVML index over the PCI BDF; server_args._torch_to_nvml_gpu_index_mapping built its own PCI-bus mapping; planner/device_map.py built a third from torch UUIDs. Three answers to one question is three chances to disagree, and this family has bitten four recorded times: the torch-vs-NVML memory read, runbook 6.1, the sgl-project#331 audit, and sgl-project#349 sweep-3 arm L (sgl-project#392). Everything resolves through the identity map now. Migrated, with each caller's refusal semantics preserved: * server_args._query_gpu_total_mib (sgl-project#336) already refused to guess; it now refuses against the identity map, and the message names the cards present and why the CUDA side could not be read. * uneven_perf._nvml_gpu_inventory bridged, then filled every gap with mapping.get(cuda_idx, cuda_idx) -- the identity substitution that names the wrong card on exactly the rigs the bridge exists for. It now refuses when it cannot place every card CUDA hands it: this inventory keys the hardware profile cache, so one misattributed card persists a profile that describes a different machine. * planner/energy._torch_to_nvml_index, a fourth copy found by the straggler audit below, had the same identity fallback and the same fallback again at its call site. A rank that cannot be placed is now left unattributed and named, instead of having its compute share added to another card's. * planner/flags._cuda_index_at, which produces the values written into --base-gpu-id and --rank-gpu-id. server_args._torch_to_nvml_gpu_index_mapping and planner/device_map.py are reduced to delegating shells, marked DEPRECATED with a grep-able sgl-project#397 note so nothing new adopts them. Their remaining callers (disaggregation/topology.py, model_loader/hibernate.py, and the planner's UI payload paths) keep their dict/DeviceMap shapes and reach the one map through them. The silent heuristic is gone. planner/device_map fell back to a FASTEST_FIRST EMULATION -- a stable sort of the cards by their SEED_CARDS fp16 GEMM peak -- whenever the real order was unreadable. It was labelled "heuristic" and callers were asked to surface the label, but a label does not make an ordering right: an unknown card ranked 0.0 and silently kept NVML order, so the emulation answered most confidently on the rigs nobody had measured. In its place, IdentityMap.require_cuda_ordinals raises DeviceOrderUnresolvedError naming WHAT could not be placed (uuid, name, nvml index, BDF, total) and WHY (no torch / no CUDA device / no context and no licence to create one / CUDA_VISIBLE_DEVICES masking / no pci_bus_id on this build). All-or-nothing on purpose: a partial bridge is worse than none, because the caller fills the gaps with the number it already has. Consequences, all of them "say nothing" rather than "say something wrong": the planner UI shows cards without a CUDA index; the single-gpu preset emits no --base-gpu-id and says why; the stock-subset and co-location presets are omitted entirely rather than carrying a guessed pin; live_metrics leaves cuda_index None. cuda_index_source is now "identity-map" or None -- there is no third, guessed state, and the UI's emulation marker is replaced by an unresolved marker read off the cards themselves. An offline --gpu NAME:MIB spec carries no card identity, so there is no live order to get wrong. Its list order is taken as declared -- the convention sgl-project#392 already fixed for manual HardwareSpecs -- under the source name "declared", which the preset text now surfaces (the old "identity" last resort did not). This changes the emitted pin for offline hetero inventories: the emulation guessed the reference box's real order and was right there by luck, the declared order is what the operator actually wrote. Straggler audit around the migrated callers. rig_artifact, split_probe and rig_coupling were re-checked and are still display-only: split_probe keys busy cards by UUID and records nvidia-smi's index only into a printed clock log; rig_coupling's CardFacts.index is never read and its GpuDescriptor indices are synthetic positions in a virtual pooled card list; rig_artifact's "index" is a GitHub-issue text index, not a device index. Two genuine stragglers outside this change's file scope are recorded for a follow-up, both feeding a CUDA ordinal straight into nvmlDeviceGetHandleByIndex: device_communicators/barlink_matrix_transport.py:152 (bar1_free -> the BAR1 window size) and utils/common.py:363 (min_visible_cuda_capability_no_init indexes an NVML-ordered list with a CUDA_VISIBLE_DEVICES entry, while _nvml_cuda_device0 twenty lines below does the same bridge correctly). Falsifier, test_device_order_bridges_397.py, built on the sgl-project#392 pattern: every rig has CUDA and NVML disagreeing in the reference shape (5090 = cuda:0 = nvml:1), plus one control rig where they agree, because a suite built on an agreeing rig passes with every bug in place. Agreement is pinned per caller, not once -- the defect is that two callers answer differently, so a shared helper asserted once would not catch it. The deleted emulation's ordering rule is kept verbatim IN the test, applied to a rig of two cards SEED_CARDS does not know: it returns [0, 1] where the cards are actually reversed, which is the silent mis-order reproduced against live code, and the same rig now produces the named error. Test results, CUDA_VISIBLE_DEVICES=99 (desk, no GPU): * 26/26 new falsifier tests green. * Regression sweep (planner, server_args, distributed, registry, disaggregation, model_loader, boot_matrix, observability): 5047 passed, 29 failed -- measured against a baseline worktree at the merge-base, which fails the same 29 on this host (CUDA-less artifacts: modelopt loader, vmm_utils LOCAL_RANK, dcp collective, s12 log fixtures). No new failure; one baseline failure (bar1_host_cleanup pgrep self-match) is flaky and passed here. * ruff (F401, F821, UP037) and codespell: the four ruff findings and the one codespell finding on the touched files are byte-identical to the baseline's on the same files. Test suites updated for the removed heuristic: test_device_map (rewritten around the adapter, the emulation cases replaced by refusal cases), test_live_metrics (fake rig gained PCI BDFs so the bridged case is still covered, plus two unbridged cases), test_flags (_HETERO_GPUS carries the cuda_index a live payload has; the offline shape is now its own fixture), test_webui (source strings, the JS marker), test_solo_reserve_sizing (fixture injects at the identity map's seams instead of at server_args' own bridge). Runbook 6.1 records the consolidation and what an unresolved order now does.
3 tasks
5 of 6 tasks
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.
No description provided.