Repository navigation
Add SGLang stock-image support and fix stock libnccl.so.2 shadow-mount / runtime binding - #401
Merged
Merged
Conversation
Extend SGLANG_REFUSED_FLAGS in runtime/common/stock_image.py to refuse --enable-torch-symm-mem, --enable-mscclpp, --enable-flashinfer-allreduce-fusion, and --flashinfer-allreduce-fusion-backend so stock SGLang plans cannot bypass PyNccl/libsircl. Print SGLang-specific Off text (stock_image.SGLANG_OFF_TEXT) in runtime/host/stock_install.py lines() instead of vLLM-specific libsircl.OFF_TEXT, and update docs/architecture/libsircl.md and unit tests accordingly. Validation: pytest (123 passed across test_stock_image.py, test_stock_install.py, test_libsircl.py), ruff check, check_repository_layout.py, and check_markdown_links.py.
FujitsuPolycom
force-pushed
the
feat/libsircl-sglang-stock
branch
from
November 21, 2026 03:17
802fb1f to
3da4c29
Compare
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.
Summary
Extends the research-only
sparkring install --image REF --transport libsircl --planstock-image flow to support unmodified ARM64 SGLang images alongside vLLM, and fixes two hardware-discovered stock-image binding bugs that blocked both SGLang (lmsysorg/sglang:v0.5.21-cu130-runtime) and community vLLM (eugr/spark-vllm:nightly-20261013) on real DGX Sparks:stock_image_probe.py,stock_image.py,stock_install.py):sglangwithout importing it (refusing images with neither or both ofvllmandsglang), checksSGLANG_NCCL_SO_PATHinfind_nccl_library(), verifies every functionNCCLLibrarybinds againstapi_manifest.json, and checkssglang/launch_server.py+ multi-node args across bothsrt/server_args.pyand modularsrt/arg_groups/(SGLang v0.5.23+).--pp-size/--dp-size/--ep-size > 1,--enable-dp-attention,--enable-ep-moe,--enable-dp-lm-head,--disaggregation-mode,--enable-memory-saver,--enable-symm-mem,--enable-torch-symm-mem,--enable-mscclpp,--enable-flashinfer-allreduce-fusion,--flashinfer-allreduce-fusion-backend,--load-format instanttensor,SGLANG_DISABLE_PYNCCL) and emits SGLang-specific plan summary output (SGLANG_OFF_TEXT).python3 -m sglang.launch_server,SGLANG_NCCL_SO_PATH,LD_PRELOAD,--disable-custom-all-reduce,--tp-size,--nnodes,--node-rank, and--dist-init-addr.libnccl.so.2files & runtimelibtorch_cuda.sobinding verification:torch._preload_cuda_deps()) and base imagesdlopenbundledlibnccl.so.2by absolute path, bypassingLD_PRELOADSONAME matching and leaving twolibnccl.so.2mappings in/proc/self/maps. The facts probe now discovers imagelibnccl.so.2realpaths (torch.nccl_libraries), and both--bindingandrank_spec()shadow bind-mount the hostlibsircl.so.<version>read-only over each path so glibc reuses the preloaded inode and never maps the image's NCCL.torch.cuda.nccl.version()reports PyTorch's compile-time NCCL headers (e.g.[2, 29, 7]) rather than runtimencclGetVersion(). The--bindingprobe now checkslibtorch_cuda.sodirectly (torch_providerviadladdrandtorch_runtime_nccl_version == 22705), while still refusing anytorch_error(such as ABI-incompatible NGC images).Verification
Offline / Unit Tests
pytest runtime/common/test_stock_image.py runtime/host/test_stock_install.py— 82 passed (Windows and WSL Linux),ruff checkclean,check_repository_layout.pypass,check_markdown_links.pypass (4,260 links).lmsysorg/sglang:v0.5.23-runtime(linux/arm64) to confirm modularsrt/arg_groups/layout andnvidia/ncclwheel path.Real DGX Spark Hardware (NVIDIA GB10
sm_121, Ring 4–7)--bindingprobes on hostspark-aa42:lmsysorg/sglang:v0.5.21-cu130-runtime: 0 preflight problems, 0 binding problems (mapped=[libsircl],torch_provider=libsircl,torch_runtime_nccl_version=22705).eugr/spark-vllm:nightly-20261013: 0 preflight problems, 0 binding problems (mapped=[libsircl],torch_provider=libsircl,torch_runtime_nccl_version=22705).nvcr.io/nvidia/vllm:26.09-py3: cleanly refused at--binding(ImportError: libtorch_cuda.so: undefined symbol: ncclGetPeerDeviceLeInfo).lmsysorg/sglang:v0.5.21-cu130-runtime(hostsspark-aa42&spark-4a87, 2 lanes):/opt/sparkring/libsircl/lib/libsircl.so.0.6.0mapped in/proc/self/mapson both ranks.torch.distributedProcessGroupNCCL: bit-exactall_reduce,all_gather,broadcast(bf16+fp32,4 KiB / 1 MiB / 16 MiB) — PASS (healthy=true,forwarded=0).PyNcclCommunicator:available=True,ncclGetVersion=2.27.5, bit-exact eagerall_reduce/all_gather/broadcast(bf16+fp32,4 KiB / 1 MiB / 16 MiB) + 10× CUDA graph capture & replay — PASS on both ranks, clean teardown, zero new RDMA errors.