Revert "Upgrade CI default CUDA version from 12.9 to 13.0" (#22727)

This commit is contained in:
Baizhou Zhang
2026-04-13 14:39:24 -07:00
committed by GitHub
parent ba7bcca6b3
commit b441317aa4
5 changed files with 33 additions and 33 deletions
+17 -14
View File
@@ -429,7 +429,10 @@ jobs:
matrix: matrix:
include: include:
- python-version: "3.10" - python-version: "3.10"
cuda-version: "13.0" cuda-version: "12.9"
# Add back when CUDA 13.0 is supported on CI
# - python-version: "3.10"
# cuda-version: "13.0"
name: Build Wheel name: Build Wheel
steps: steps:
- name: Cleanup - name: Cleanup
@@ -477,7 +480,7 @@ jobs:
matrix: matrix:
include: include:
- python-version: "3.10" - python-version: "3.10"
cuda-version: "13.0" cuda-version: "12.9"
name: Build Wheel Arm name: Build Wheel Arm
steps: steps:
- name: Cleanup - name: Cleanup
@@ -584,7 +587,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -691,7 +694,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -749,7 +752,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -804,7 +807,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -857,7 +860,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -946,7 +949,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1000,7 +1003,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1070,7 +1073,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1120,7 +1123,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1180,7 +1183,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1246,7 +1249,7 @@ jobs:
with: with:
path: sgl-kernel/dist/ path: sgl-kernel/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.10-cuda12.9
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -1300,7 +1303,7 @@ jobs:
# with: # with:
# path: sgl-kernel/dist/ # path: sgl-kernel/dist/
# merge-multiple: true # merge-multiple: true
# pattern: wheel-python3.10-cuda13.0-aarch64 # pattern: wheel-python3.10-cuda12.9-aarch64
# #
# - name: Install dependencies # - name: Install dependencies
# timeout-minutes: 20 # timeout-minutes: 20
+4 -4
View File
@@ -22,7 +22,7 @@ dependencies = [
"blobfile==3.0.0", "blobfile==3.0.0",
"build", "build",
"compressed-tensors", "compressed-tensors",
"cuda-python>=13.0", "cuda-python==12.9",
"decord2 ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'armv7l')", "decord2 ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'armv7l')",
"datasets", "datasets",
"einops", "einops",
@@ -86,14 +86,14 @@ url = "https://pypi.org/simple"
default = true default = true
[[tool.uv.index]] [[tool.uv.index]]
name = "torch-cu130" name = "torch-cu129"
url = "https://download.pytorch.org/whl/cu130" url = "https://download.pytorch.org/whl/cu129"
explicit = true explicit = true
[tool.uv.sources] [tool.uv.sources]
torch = [ torch = [
{ index = "pypi", marker = "platform_machine == 'x86_64'"}, { index = "pypi", marker = "platform_machine == 'x86_64'"},
{ index = "torch-cu130", marker = "platform_machine == 'aarch64'"}, { index = "torch-cu129", marker = "platform_machine == 'aarch64'"},
] ]
[project.optional-dependencies] [project.optional-dependencies]
@@ -5,7 +5,7 @@
# Required environment (caller must export or set): # Required environment (caller must export or set):
# UNINSTALL_JIT_CACHE — literal true/false (skip download when false) # UNINSTALL_JIT_CACHE — literal true/false (skip download when false)
# FLASHINFER_PYTHON_REQUIRED — e.g. from python/pyproject.toml (flashinfer_python) # FLASHINFER_PYTHON_REQUIRED — e.g. from python/pyproject.toml (flashinfer_python)
# CU_VERSION — e.g. cu130 # CU_VERSION — e.g. cu129
# PIP_CMD — e.g. "pip" or "uv pip" # PIP_CMD — e.g. "pip" or "uv pip"
# PIP_INSTALL_SUFFIX — extra pip args for this runner # PIP_INSTALL_SUFFIX — extra pip args for this runner
set -euxo pipefail set -euxo pipefail
+7 -2
View File
@@ -100,8 +100,13 @@ if [ "$GRACE_BLACKWELL" = "1" ]; then
if [ "$CUDA_VERSION" = "12.8" ]; then if [ "$CUDA_VERSION" = "12.8" ]; then
CHOSEN_TORCH_CUDA_ARCH_LIST='10.0' CHOSEN_TORCH_CUDA_ARCH_LIST='10.0'
elif awk -v ver="$CUDA_VERSION" 'BEGIN {exit !(ver > 12.8)}'; then elif awk -v ver="$CUDA_VERSION" 'BEGIN {exit !(ver > 12.8)}'; then
# CUDA > 12.8 supports sm_103 (Blackwell) # With cuda > 12.8, the compiler supports 10.3, so we should use
CHOSEN_TORCH_CUDA_ARCH_LIST='10.0;10.3' # CHOSEN_TORCH_CUDA_ARCH_LIST='10.0;10.3'
#
# However, our CI machine has a weird setup and nvidia-smi reports wrong CUDA version in the container.
# The container is actually cuda 12.8, but nvidia-smi reports 13.0, leading to compilation errors. so we
# drop 10.3.
CHOSEN_TORCH_CUDA_ARCH_LIST='10.0'
else else
echo "Unsupported CUDA version for Grace Blackwell: $CUDA_VERSION" && exit 1 echo "Unsupported CUDA version for Grace Blackwell: $CUDA_VERSION" && exit 1
fi && \ fi && \
+4 -12
View File
@@ -23,7 +23,7 @@ set -euxo pipefail
# Configuration & timing # Configuration & timing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Set up environment variables # Set up environment variables
CU_VERSION="cu130" CU_VERSION="cu129"
# Nvidia package versions we override (torch pins older versions). # Nvidia package versions we override (torch pins older versions).
# Used both as pip constraints during install and for post-install verification. # Used both as pip constraints during install and for post-install verification.
@@ -244,15 +244,7 @@ if [ "${CUSTOM_BUILD_SGL_KERNEL:-}" = "true" ] && [ -d "sgl-kernel/dist" ]; then
else else
WHEEL_ARCH="x86_64" WHEEL_ARCH="x86_64"
fi fi
# Wheel may have +cuXYZ suffix (e.g. sglang_kernel-0.4.0+cu130-...) depending on CUDA version $PIP_CMD install sgl-kernel/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl --force-reinstall $PIP_INSTALL_SUFFIX
KERNEL_WHL=$(ls sgl-kernel/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}*-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1)
if [ -z "$KERNEL_WHL" ]; then
echo "ERROR: No matching sgl-kernel wheel found in sgl-kernel/dist/ for version ${SGL_KERNEL_VERSION_FROM_KERNEL} arch ${WHEEL_ARCH}"
ls -alh sgl-kernel/dist/
exit 1
fi
echo "Installing sgl-kernel wheel: $KERNEL_WHL"
$PIP_CMD install "$KERNEL_WHL" --force-reinstall $PIP_INSTALL_SUFFIX
elif [ "${CUSTOM_BUILD_SGL_KERNEL:-}" = "true" ] && [ ! -d "sgl-kernel/dist" ]; then elif [ "${CUSTOM_BUILD_SGL_KERNEL:-}" = "true" ] && [ ! -d "sgl-kernel/dist" ]; then
# CUSTOM_BUILD_SGL_KERNEL was set but artifacts not available (e.g., stage rerun without wheel build) # CUSTOM_BUILD_SGL_KERNEL was set but artifacts not available (e.g., stage rerun without wheel build)
# Fail instead of falling back to PyPI - we need to test the built kernel, not PyPI version # Fail instead of falling back to PyPI - we need to test the built kernel, not PyPI version
@@ -326,10 +318,10 @@ mark_step_done "Install extra dependency"
# Fix other dependencies # Fix other dependencies
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Fix CUDA version mismatch between torch and torchaudio. # Fix CUDA version mismatch between torch and torchaudio.
# PyPI's torch bundles a specific CUDA version but torchaudio from pytorch.org/cu130 may use a different one. # PyPI's torch 2.9.1 bundles cu128 but torchaudio from pytorch.org/cu129 uses cu129.
# This mismatch causes torchaudio's C extension to fail loading, producing: # This mismatch causes torchaudio's C extension to fail loading, producing:
# "partially initialized module 'torchaudio' has no attribute 'lib'" # "partially initialized module 'torchaudio' has no attribute 'lib'"
# We cannot replace torch with a different CUDA version (breaks sgl_kernel ABI), so instead we reinstall # We cannot replace torch with cu129 (breaks sgl_kernel ABI), so instead we reinstall
# torchaudio/torchvision from an index matching torch's CUDA version. # torchaudio/torchvision from an index matching torch's CUDA version.
TORCH_CUDA_VER=$(python3 -c "import torch; v=torch.version.cuda; parts=v.split('.'); print(f'cu{parts[0]}{parts[1]}')") TORCH_CUDA_VER=$(python3 -c "import torch; v=torch.version.cuda; parts=v.split('.'); print(f'cu{parts[0]}{parts[1]}')")
echo "Detected torch CUDA version: ${TORCH_CUDA_VER}" echo "Detected torch CUDA version: ${TORCH_CUDA_VER}"