[CI] Preserve NCCL 2.30.7 after dependency installs (#37508)
This commit is contained in:
@@ -539,6 +539,8 @@ install_sglang() {
|
|||||||
|
|
||||||
install_nccl() {
|
install_nccl() {
|
||||||
if [ "$CU_MAJOR" = "13" ]; then
|
if [ "$CU_MAJOR" = "13" ]; then
|
||||||
|
# PyTorch pins 2.29.7, so this override must run after every command
|
||||||
|
# that resolves Python dependencies (including lmms-eval).
|
||||||
$PIP_CMD install "nvidia-nccl-cu13==2.30.7" \
|
$PIP_CMD install "nvidia-nccl-cu13==2.30.7" \
|
||||||
--force-reinstall --no-deps $PIP_INSTALL_SUFFIX
|
--force-reinstall --no-deps $PIP_INSTALL_SUFFIX
|
||||||
else
|
else
|
||||||
@@ -827,6 +829,24 @@ verify_imports() {
|
|||||||
# One process; torch/cutlass do not import sglang, so the find_spec check
|
# One process; torch/cutlass do not import sglang, so the find_spec check
|
||||||
# still runs ahead of any sglang import.
|
# still runs ahead of any sglang import.
|
||||||
SGLANG_EXPECTED_INIT="${REPO_ROOT}/python/sglang/__init__.py" python3 -c '
|
SGLANG_EXPECTED_INIT="${REPO_ROOT}/python/sglang/__init__.py" python3 -c '
|
||||||
|
import ctypes
|
||||||
|
import importlib.metadata
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.argv[1] == "13":
|
||||||
|
if importlib.metadata.version("nvidia-nccl-cu13") != "2.30.7":
|
||||||
|
raise SystemExit("nvidia-nccl-cu13 was changed after the final CI override")
|
||||||
|
nccl = ctypes.CDLL("libnccl.so.2")
|
||||||
|
nccl_version = ctypes.c_int()
|
||||||
|
status = nccl.ncclGetVersion(ctypes.byref(nccl_version))
|
||||||
|
if status != 0 or nccl_version.value != 23007:
|
||||||
|
raise SystemExit(
|
||||||
|
f"expected NCCL runtime 2.30.7, got status={status}, "
|
||||||
|
f"raw_version={nccl_version.value}"
|
||||||
|
)
|
||||||
|
print("NCCL package and runtime versions are 2.30.7")
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
print(torch.version.cuda)
|
print(torch.version.cuda)
|
||||||
import deep_ep
|
import deep_ep
|
||||||
@@ -837,7 +857,7 @@ import cutlass.cute
|
|||||||
# A shadowed sglang still imports, so without this the failure only surfaces
|
# A shadowed sglang still imports, so without this the failure only surfaces
|
||||||
# as a missing submodule during the test step. find_spec, not import: the
|
# as a missing submodule during the test step. find_spec, not import: the
|
||||||
# finders alone answer this without importing sglang.
|
# finders alone answer this without importing sglang.
|
||||||
import importlib.util, os
|
import importlib.util
|
||||||
want = os.environ["SGLANG_EXPECTED_INIT"]
|
want = os.environ["SGLANG_EXPECTED_INIT"]
|
||||||
spec = importlib.util.find_spec("sglang")
|
spec = importlib.util.find_spec("sglang")
|
||||||
if spec is None:
|
if spec is None:
|
||||||
@@ -860,7 +880,7 @@ for mod in ("server", "grpc", "multimodal"):
|
|||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise SystemExit(f"{name} is present but does not load: {exc!r}")
|
raise SystemExit(f"{name} is present but does not load: {exc!r}")
|
||||||
print(f"{name} loads")
|
print(f"{name} loads")
|
||||||
'
|
' "$CU_MAJOR"
|
||||||
|
|
||||||
mark_step_done "${FUNCNAME[0]}"
|
mark_step_done "${FUNCNAME[0]}"
|
||||||
}
|
}
|
||||||
@@ -886,7 +906,6 @@ main() {
|
|||||||
setup_cargo_cache
|
setup_cargo_cache
|
||||||
install_sglang
|
install_sglang
|
||||||
release_cargo_cache_lock
|
release_cargo_cache_lock
|
||||||
install_nccl
|
|
||||||
# Diffusion B200 CI imports torch inside install_sglang_kernel after removing
|
# Diffusion B200 CI imports torch inside install_sglang_kernel after removing
|
||||||
# stale CUDA 12 NVIDIA wheels, so opt into one early LD_LIBRARY_PATH refresh.
|
# stale CUDA 12 NVIDIA wheels, so opt into one early LD_LIBRARY_PATH refresh.
|
||||||
if [ "${SGLANG_CI_EARLY_LD_LIBRARY_PATH:-0}" = "1" ]; then
|
if [ "${SGLANG_CI_EARLY_LD_LIBRARY_PATH:-0}" = "1" ]; then
|
||||||
@@ -899,6 +918,7 @@ main() {
|
|||||||
stabilize_flashinfer_jit_paths
|
stabilize_flashinfer_jit_paths
|
||||||
install_extra_deps
|
install_extra_deps
|
||||||
install_test_tools
|
install_test_tools
|
||||||
|
install_nccl
|
||||||
prepare_runner
|
prepare_runner
|
||||||
setup_ld_library_path
|
setup_ld_library_path
|
||||||
verify_imports
|
verify_imports
|
||||||
|
|||||||
Reference in New Issue
Block a user