[Deps] Retire the CUDA 12 lane (#38404)
Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
This commit is contained in:
co-authored by
Mohammad Angkad
parent
fae8cd84cb
commit
52c191da52
@@ -3,12 +3,12 @@
|
||||
#
|
||||
# Usage: build_sgl_deep_gemm.sh <PYTHON_VERSION> <CUDA_VERSION> <DEEPGEMM_SRC> [ARCH]
|
||||
# PYTHON_VERSION: e.g. 3.10
|
||||
# CUDA_VERSION: e.g. 12.9 or 13.0
|
||||
# CUDA_VERSION: e.g. 13.0
|
||||
# DEEPGEMM_SRC: path to a checkout of sgl-project/DeepGEMM
|
||||
# ARCH: x86_64 (default) or aarch64
|
||||
#
|
||||
# Writes:
|
||||
# <DEEPGEMM_SRC>/dist/ — wheel(s) tagged +cu129 / +cu130 and manylinux
|
||||
# <DEEPGEMM_SRC>/dist/ — wheel(s) tagged +cu130 and manylinux
|
||||
# <DEEPGEMM_SRC>/dist-pypi/ — cu130 only: same wheel(s) with +cu130 stripped
|
||||
# (PyPI rejects local-version segments)
|
||||
set -ex
|
||||
@@ -25,7 +25,6 @@ ARCH="${4:-$(uname -i)}"
|
||||
|
||||
case "${CUDA_VERSION}" in
|
||||
13.0) CU_TAG=cu130 ;;
|
||||
12.9) CU_TAG=cu129 ;;
|
||||
*)
|
||||
echo "Unsupported CUDA_VERSION: ${CUDA_VERSION}" >&2
|
||||
exit 1
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# Usage:
|
||||
# build_sgl_deepep.sh <python-version> <cuda-version> <deepep-source> <packaging-overlay> [architecture]
|
||||
#
|
||||
# Writes CUDA-tagged wheels to <deepep-source>/dist. CUDA 13 builds also write
|
||||
# PyPI-ready wheels without the local CUDA version to <deepep-source>/dist-pypi.
|
||||
# Writes CUDA-tagged wheels to <deepep-source>/dist, plus PyPI-ready wheels
|
||||
# without the local CUDA version in <deepep-source>/dist-pypi.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -14,7 +14,7 @@ usage() {
|
||||
Usage: build_sgl_deepep.sh <python-version> <cuda-version> <deepep-source> <packaging-overlay> [architecture]
|
||||
|
||||
python-version: 3.10, 3.11, 3.12, or 3.13
|
||||
cuda-version: 12.9 or 13.0
|
||||
cuda-version: 13.0
|
||||
deepep-source: checkout of the selected DeepEP implementation branch
|
||||
packaging-overlay: path to the shared DeepEP sgl_deep_ep directory
|
||||
architecture: x86_64 or aarch64 (defaults to the current machine)
|
||||
@@ -45,9 +45,6 @@ case "${PYTHON_VERSION}" in
|
||||
esac
|
||||
|
||||
case "${CUDA_VERSION}" in
|
||||
12.9)
|
||||
CUDA_TAG=cu129
|
||||
;;
|
||||
13.0)
|
||||
CUDA_TAG=cu130
|
||||
;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Install dependencies for CUDA CI jobs.
|
||||
#
|
||||
# CU_VERSION (default: cu130) controls PyTorch index URL, FlashInfer JIT cache
|
||||
# index, and nvrtc variant selection.
|
||||
# index, and the sglang wheel index. CUDA 13 only.
|
||||
set -euxo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -32,10 +32,14 @@ mark_step_done() {
|
||||
|
||||
configure_environment() {
|
||||
# CU_VERSION controls PyTorch index URL, FlashInfer JIT cache index, and
|
||||
# nvrtc variant selection (cu12 vs cu13).
|
||||
# the sglang wheel index. Only CUDA 13 lanes exist: PyTorch 2.14 publishes
|
||||
# no CUDA 12 wheels for the cu129 index the retired cu12 lane used.
|
||||
CU_VERSION="${CU_VERSION:-cu130}"
|
||||
CU_STRIP="${CU_VERSION#cu}"
|
||||
CU_MAJOR="${CU_STRIP:0:2}"
|
||||
case "${CU_STRIP}" in
|
||||
13*) ;;
|
||||
*) echo "FATAL: unsupported CU_VERSION=${CU_VERSION}; only CUDA 13 is supported"; exit 1 ;;
|
||||
esac
|
||||
|
||||
OPTIONAL_DEPS="${1:-}"
|
||||
|
||||
@@ -366,11 +370,6 @@ remove_stale_cuda12_nvidia_wheels() {
|
||||
local -a NVIDIA_WHEELS_TO_RESTORE=()
|
||||
local -a STALE_CUDA12_NVIDIA_WHEELS=()
|
||||
|
||||
if [ "$CU_MAJOR" != "13" ]; then
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
return
|
||||
fi
|
||||
|
||||
mapfile -t INSTALLED_NVIDIA_WHEELS < <(
|
||||
python3 -m pip list --format=freeze | sed -n '/^nvidia-.*==/p'
|
||||
)
|
||||
@@ -462,30 +461,6 @@ install_pytorch_stack() {
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
}
|
||||
|
||||
install_cuda12_deepep_wheel() {
|
||||
if [ "$CU_MAJOR" = "13" ]; then
|
||||
echo "CUDA 13 uses the public sgl-deep-ep wheel declared in python/pyproject.toml"
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
return
|
||||
fi
|
||||
|
||||
local version
|
||||
version=$(grep -Po -m1 '"sgl-deep-ep==\K[^"]+' python/pyproject.toml || true)
|
||||
if [ -z "$version" ]; then
|
||||
echo "ERROR: python/pyproject.toml must pin sgl-deep-ep"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# CUDA 12 wheels intentionally live only on the SGLang wheel index. Their
|
||||
# local version satisfies the public-version pyproject pin, so the later
|
||||
# editable SGLang install keeps this CUDA-matched wheel.
|
||||
$PIP_CMD install "sgl-deep-ep==${version}+${CU_VERSION}" \
|
||||
--index-url "https://docs.sglang.ai/whl/${CU_VERSION}/" \
|
||||
--force-reinstall --no-deps $PIP_INSTALL_SUFFIX
|
||||
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
}
|
||||
|
||||
require_prebuilt_rust_exts() {
|
||||
# Stages whose download succeeded set this to none. Runs before
|
||||
# setup_pip_toolchain uninstalls sglang, so clearing it here still reaches
|
||||
@@ -551,14 +526,10 @@ install_sglang() {
|
||||
}
|
||||
|
||||
install_nccl() {
|
||||
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" \
|
||||
--force-reinstall --no-deps $PIP_INSTALL_SUFFIX
|
||||
else
|
||||
echo "CUDA ${CU_MAJOR} does not require the NCCL Gin wheel"
|
||||
fi
|
||||
# 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" \
|
||||
--force-reinstall --no-deps $PIP_INSTALL_SUFFIX
|
||||
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
}
|
||||
@@ -628,8 +599,8 @@ install_sglang_kernel() {
|
||||
|
||||
if [ "${CUSTOM_BUILD_SGL_KERNEL:-}" != "true" ]; then
|
||||
# The PyPI default wheel tracks one CUDA version (currently cu130); other
|
||||
# runners (e.g. h20 / cu129) need the +${CU_VERSION}-tagged wheel from the
|
||||
# sglang index, linked against the right libnvrtc.
|
||||
# runners need the +${CU_VERSION}-tagged wheel from the sglang index,
|
||||
# linked against the right libnvrtc.
|
||||
SGL_KERNEL_WANTED="${SGL_KERNEL_VERSION_FROM_SRT}+${CU_VERSION}"
|
||||
if installed_wheel_ok sglang-kernel "${SGL_KERNEL_WANTED}" reject-local; then
|
||||
echo "sglang-kernel==${SGL_KERNEL_WANTED} already installed, keeping it"
|
||||
@@ -640,18 +611,11 @@ install_sglang_kernel() {
|
||||
echo "CUSTOM_BUILD_SGL_KERNEL=true: keeping freshly built sgl-kernel wheel."
|
||||
fi
|
||||
SGL_DEEP_GEMM_VERSION=$(grep -Po -m1 '(?<=sgl-deep-gemm==)[0-9A-Za-z\.\-]+' python/pyproject.toml)
|
||||
if [ "$CU_MAJOR" = "13" ]; then
|
||||
SGL_DEEP_GEMM_WANTED="${SGL_DEEP_GEMM_VERSION}"
|
||||
else
|
||||
SGL_DEEP_GEMM_WANTED="${SGL_DEEP_GEMM_VERSION}+cu129"
|
||||
fi
|
||||
# No reject-local: nothing builds sgl-deep-gemm locally.
|
||||
if installed_wheel_ok sgl-deep-gemm "${SGL_DEEP_GEMM_WANTED}"; then
|
||||
echo "sgl-deep-gemm==${SGL_DEEP_GEMM_WANTED} already installed, keeping it"
|
||||
elif [ "$CU_MAJOR" = "13" ]; then
|
||||
$PIP_CMD install "sgl-deep-gemm==${SGL_DEEP_GEMM_VERSION}" --force-reinstall $PIP_INSTALL_SUFFIX
|
||||
if installed_wheel_ok sgl-deep-gemm "${SGL_DEEP_GEMM_VERSION}"; then
|
||||
echo "sgl-deep-gemm==${SGL_DEEP_GEMM_VERSION} already installed, keeping it"
|
||||
else
|
||||
$PIP_CMD install "https://github.com/sgl-project/whl/releases/download/v${SGL_DEEP_GEMM_VERSION}/sgl_deep_gemm-${SGL_DEEP_GEMM_VERSION}+cu129-py3-none-manylinux2014_$(uname -m).whl" --force-reinstall $PIP_INSTALL_SUFFIX
|
||||
$PIP_CMD install "sgl-deep-gemm==${SGL_DEEP_GEMM_VERSION}" --force-reinstall $PIP_INSTALL_SUFFIX
|
||||
fi
|
||||
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
@@ -739,17 +703,10 @@ stabilize_flashinfer_jit_paths() {
|
||||
install_extra_deps() {
|
||||
MOONCAKE_VERSION="0.3.13"
|
||||
NIXL_VERSION="1.3.0"
|
||||
if [ "$CU_MAJOR" = "13" ]; then
|
||||
MOONCAKE_PKG="mooncake-transfer-engine-cuda13==${MOONCAKE_VERSION}"
|
||||
MOONCAKE_STALE_PKG="mooncake-transfer-engine"
|
||||
NIXL_BIN_NAME="nixl-cu13"
|
||||
EXTRA_NVIDIA_SPECS="nvidia-cuda-nvrtc"
|
||||
else
|
||||
MOONCAKE_PKG="mooncake-transfer-engine==${MOONCAKE_VERSION}"
|
||||
MOONCAKE_STALE_PKG="mooncake-transfer-engine-cuda13"
|
||||
NIXL_BIN_NAME="nixl-cu12"
|
||||
EXTRA_NVIDIA_SPECS="nvidia-cuda-nvrtc-cu12"
|
||||
fi
|
||||
MOONCAKE_PKG="mooncake-transfer-engine-cuda13==${MOONCAKE_VERSION}"
|
||||
MOONCAKE_STALE_PKG="mooncake-transfer-engine"
|
||||
NIXL_BIN_NAME="nixl-cu13"
|
||||
EXTRA_NVIDIA_SPECS="nvidia-cuda-nvrtc"
|
||||
# Both variants own the same mooncake/ package files and bin/ scripts
|
||||
# (mooncake_master, etc.). Uninstalling the stale variant deletes shared
|
||||
# files that the live variant's RECORD still references, so we force a
|
||||
@@ -834,20 +791,18 @@ verify_imports() {
|
||||
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")
|
||||
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
|
||||
print(torch.version.cuda)
|
||||
@@ -882,7 +837,7 @@ for mod in ("server", "grpc", "multimodal"):
|
||||
except Exception as exc:
|
||||
raise SystemExit(f"{name} is present but does not load: {exc!r}")
|
||||
print(f"{name} loads")
|
||||
' "$CU_MAJOR"
|
||||
'
|
||||
|
||||
mark_step_done "${FUNCNAME[0]}"
|
||||
}
|
||||
@@ -904,7 +859,6 @@ main() {
|
||||
remove_stale_cuda12_nvidia_wheels
|
||||
uninstall_stale_flashinfer
|
||||
install_pytorch_stack
|
||||
install_cuda12_deepep_wheel
|
||||
setup_cargo_cache
|
||||
install_sglang
|
||||
release_cargo_cache_lock
|
||||
|
||||
@@ -3,7 +3,7 @@ import datetime
|
||||
import json
|
||||
import sys
|
||||
|
||||
MOVING_TAGS = {"dev", "dev-cu12", "dev-cu13", "latest"}
|
||||
MOVING_TAGS = {"dev", "dev-cu13", "latest"}
|
||||
|
||||
|
||||
def render_tag_template(tag: str, version: str, date: str, short_sha: str) -> str:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Usage: rename_wheels.sh <WHEEL_DIR> <CU_TAG> <ARCH>
|
||||
# WHEEL_DIR: directory containing the *.whl file (e.g. DeepGEMM/dist)
|
||||
# CU_TAG: cu129 | cu130
|
||||
# CU_TAG: cu130
|
||||
# ARCH: x86_64 | aarch64
|
||||
set -ex
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import hashlib
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
SUPPORTED_CUDA_VERSIONS = ("129", "130")
|
||||
SUPPORTED_CUDA_VERSIONS = ("130",)
|
||||
WHEEL_PATTERN = re.compile(
|
||||
r"^sgl_deep_ep-(?P<version>[0-9][^-]*)-[^-]+-[^-]+-[^-]+\.whl$"
|
||||
)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Generates a PEP 503 simple index for sgl-deep-gemm wheels under
|
||||
# sgl-whl/cu<version>/sgl-deep-gemm/index.html. Mirrors the layout used by
|
||||
# update_kernel_whl_index.py so consumers can `pip install
|
||||
# sgl-deep-gemm --extra-index-url https://...whl/cu129`.
|
||||
# sgl-deep-gemm --extra-index-url https://...whl/cu130`.
|
||||
|
||||
import argparse
|
||||
import hashlib
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
SUPPORTED_CUDA_VERSIONS = ["129", "130"]
|
||||
SUPPORTED_CUDA_VERSIONS = ["130"]
|
||||
|
||||
|
||||
def update_wheel_index(cuda_version, wheel_dir):
|
||||
|
||||
@@ -5,9 +5,9 @@ import hashlib
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
# All the CUDA versions that the wheels will cover
|
||||
SUPPORTED_CUDA_VERSIONS = ["129", "130"]
|
||||
DEFAULT_CUDA_VERSION = "130"
|
||||
# Local version a CUDA wheel carries, e.g. sglang_kernel-0.4.6.post1+cu130-...whl
|
||||
CUDA_LOCAL_VERSION_PATTERN = re.compile(r"\+cu(\d+)")
|
||||
|
||||
|
||||
def check_wheel_cuda_version(path_name, target_cuda_version):
|
||||
@@ -19,16 +19,17 @@ def check_wheel_cuda_version(path_name, target_cuda_version):
|
||||
):
|
||||
return False
|
||||
|
||||
# For other CUDA versions, the wheel path name will contain the cuda version suffix, e.g. sglang_kernel-0.4.0+cu130-cp310-abi3-manylinux2014_x86_64.whl
|
||||
if target_cuda_version != DEFAULT_CUDA_VERSION:
|
||||
return target_cuda_version in path_name
|
||||
# Match on the wheel's own +cuNNN tag rather than a list of known versions,
|
||||
# so a wheel built for a CUDA version this script has never heard of is
|
||||
# rejected instead of landing in the target index.
|
||||
match = CUDA_LOCAL_VERSION_PATTERN.search(path_name)
|
||||
if match is not None:
|
||||
return match.group(1) == target_cuda_version
|
||||
|
||||
# For the default CUDA version, the wheel path name will not contain any cuda version suffix, e.g. sglang_kernel-0.4.0-cp310-abi3-manylinux2014_x86_64.whl
|
||||
# So we need to check if the wheel path name contains any other cuda version suffix
|
||||
for cuda_version in SUPPORTED_CUDA_VERSIONS:
|
||||
if cuda_version != DEFAULT_CUDA_VERSION and cuda_version in path_name:
|
||||
return False
|
||||
return True
|
||||
# An untagged wheel is the default-CUDA build, e.g.
|
||||
# sglang_kernel-0.4.0-cp310-abi3-manylinux2014_x86_64.whl (PyPI rejects
|
||||
# local versions, so that upload strips the tag).
|
||||
return target_cuda_version == DEFAULT_CUDA_VERSION
|
||||
|
||||
|
||||
def update_wheel_index(cuda_version=DEFAULT_CUDA_VERSION, rocm_version=None):
|
||||
|
||||
@@ -35,7 +35,7 @@ def update_wheel_index(
|
||||
Args:
|
||||
commit_hash: Short git commit hash (e.g., 'c5f1e86')
|
||||
nightly_version: Full nightly version string (e.g., '0.5.6.post1.dev7716+gc5f1e86')
|
||||
cuda_version: CUDA version string (e.g., '129' or '130')
|
||||
cuda_version: CUDA version string (e.g., '130')
|
||||
build_date: Build date in YYYY-MM-DD format (e.g., '2025-12-13')
|
||||
"""
|
||||
dist_dir = pathlib.Path("dist")
|
||||
@@ -176,7 +176,7 @@ def main():
|
||||
"--cuda-version",
|
||||
type=str,
|
||||
default="130",
|
||||
help="CUDA version (e.g., '129' or '130'). Defaults to '130'.",
|
||||
help="CUDA version (e.g., '130'). Defaults to '130'.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--build-date",
|
||||
|
||||
Reference in New Issue
Block a user