[CI] python: Move the remaining CUDA build paths off Python 3.10 (#44393)

Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
This commit is contained in:
Mohammad Miadh Angkad
2026-10-19 14:29:00 -07:00
committed by GitHub
co-authored by Mohammad Angkad
parent b20cb3665d
commit 7656ea0e74
35 changed files with 77 additions and 100 deletions
@@ -50,7 +50,7 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- python-version: "3.10" - python-version: "3.11"
cuda-version: "13.0" cuda-version: "13.0"
name: ${{ inputs.job_display_name }} name: ${{ inputs.job_display_name }}
steps: steps:
+2 -2
View File
@@ -147,7 +147,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Download artifacts (v6) - name: Download artifacts (v6)
if: ${{ fromJson(inputs.check_changes).sgl_kernel == 'true' && steps.rc.outputs.artifact_version == 'v6' }} if: ${{ fromJson(inputs.check_changes).sgl_kernel == 'true' && steps.rc.outputs.artifact_version == 'v6' }}
@@ -155,7 +155,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- uses: ./.github/actions/download-rust-ext - uses: ./.github/actions/download-rust-ext
if: ${{ !inputs.skip_prebuilt_rust_ext }} if: ${{ !inputs.skip_prebuilt_rust_ext }}
+1 -5
View File
@@ -58,11 +58,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install Python dependencies
run: |
pip install tomli
- name: Configure Git and branch - name: Configure Git and branch
run: | run: |
@@ -24,11 +24,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install Python dependencies
run: |
pip install tomli
- name: Configure Git and branch - name: Configure Git and branch
run: | run: |
@@ -22,11 +22,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install Python dependencies
run: |
pip install tomli
- name: Check if sync is needed - name: Check if sync is needed
id: check_sync id: check_sync
@@ -24,11 +24,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install Python dependencies
run: |
pip install tomli
- name: Configure Git and branch - name: Configure Git and branch
run: | run: |
@@ -26,11 +26,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install Python dependencies
run: |
pip install tomli
- name: Configure Git and branch - name: Configure Git and branch
id: set_output id: set_output
+5 -5
View File
@@ -25,7 +25,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Generate Summary Report - name: Generate Summary Report
run: | run: |
@@ -41,7 +41,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Generate Tests by Folder Report - name: Generate Tests by Folder Report
run: | run: |
@@ -57,7 +57,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Generate Tests by Suite Report - name: Generate Tests by Suite Report
run: | run: |
@@ -73,7 +73,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Generate Tests by GPU Count Report - name: Generate Tests by GPU Count Report
run: | run: |
@@ -184,7 +184,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Generate JSON Report - name: Generate JSON Report
run: | run: |
+7 -7
View File
@@ -24,7 +24,7 @@ on:
default: '' default: ''
type: string type: string
kernel_artifact_run_id: kernel_artifact_run_id:
description: "Optional sgl-kernel wheel source: GitHub Actions run ID of a pr-test.yml run on the SAME commit as 'ref' that uploaded wheel-python3.10-cuda13.0. Use only when this branch's torch/ABI change makes the PyPI sglang-kernel wheel incompatible. Find it under Actions > pr-test; artifacts expire after 90 days." description: "Optional sgl-kernel wheel source: GitHub Actions run ID of a pr-test.yml run on the SAME commit as 'ref' that uploaded wheel-python3.11-cuda13.0. Use only when this branch's torch/ABI change makes the PyPI sglang-kernel wheel incompatible. Find it under Actions > pr-test; artifacts expire after 90 days."
required: false required: false
default: '' default: ''
type: string type: string
@@ -204,7 +204,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
name: wheel-python3.10-cuda13.0 name: wheel-python3.11-cuda13.0
run-id: ${{ inputs.kernel_artifact_run_id }} run-id: ${{ inputs.kernel_artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -351,7 +351,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Verify write access to sgl-project/ci-data-diffusion - name: Verify write access to sgl-project/ci-data-diffusion
if: ${{ inputs.publish }} if: ${{ inputs.publish }}
@@ -403,7 +403,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
name: wheel-python3.10-cuda13.0 name: wheel-python3.11-cuda13.0
run-id: ${{ inputs.kernel_artifact_run_id }} run-id: ${{ inputs.kernel_artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -479,7 +479,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
name: wheel-python3.10-cuda13.0 name: wheel-python3.11-cuda13.0
run-id: ${{ inputs.kernel_artifact_run_id }} run-id: ${{ inputs.kernel_artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -557,7 +557,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
name: wheel-python3.10-cuda13.0 name: wheel-python3.11-cuda13.0
run-id: ${{ inputs.kernel_artifact_run_id }} run-id: ${{ inputs.kernel_artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -630,7 +630,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
name: wheel-python3.10-cuda13.0 name: wheel-python3.11-cuda13.0
run-id: ${{ inputs.kernel_artifact_run_id }} run-id: ${{ inputs.kernel_artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -99,7 +99,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda13.0 pattern: wheel-python3.11-cuda13.0
- uses: ./.github/actions/download-rust-ext - uses: ./.github/actions/download-rust-ext
with: with:
+9 -9
View File
@@ -65,7 +65,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Compute partitions - name: Compute partitions
id: compute id: compute
@@ -101,7 +101,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -168,7 +168,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -239,7 +239,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -304,7 +304,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -374,7 +374,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -419,7 +419,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -505,7 +505,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- name: Install dependencies - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
@@ -548,7 +548,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Download all execution reports - name: Download all execution reports
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
+4 -4
View File
@@ -56,7 +56,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- uses: ./.github/actions/download-rust-ext - uses: ./.github/actions/download-rust-ext
with: with:
@@ -95,7 +95,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- uses: ./.github/actions/download-rust-ext - uses: ./.github/actions/download-rust-ext
with: with:
@@ -146,7 +146,7 @@ jobs:
with: with:
path: python/sglang/kernels/aot/dist/ path: python/sglang/kernels/aot/dist/
merge-multiple: true merge-multiple: true
pattern: wheel-python3.10-cuda* pattern: wheel-python3.11-cuda*
- uses: ./.github/actions/download-rust-ext - uses: ./.github/actions/download-rust-ext
with: with:
@@ -181,7 +181,7 @@ jobs:
# with: # with:
# path: python/sglang/kernels/aot/dist/ # path: python/sglang/kernels/aot/dist/
# merge-multiple: true # merge-multiple: true
# pattern: wheel-python3.10-cuda* # pattern: wheel-python3.11-cuda*
# - name: Install dependencies # - name: Install dependencies
# run: | # run: |
+1 -1
View File
@@ -161,7 +161,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.12"
- name: Update wheel index - name: Update wheel index
run: | run: |
+1 -1
View File
@@ -170,7 +170,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.12"
- name: Update wheel index - name: Update wheel index
run: | run: |
+1 -1
View File
@@ -104,7 +104,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.12"
- name: Upload to pypi - name: Upload to pypi
run: | run: |
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"] python-version: ["3.11", "3.12", "3.13"]
arch: [x86_64, aarch64] arch: [x86_64, aarch64]
include: include:
- arch: x86_64 - arch: x86_64
+4 -3
View File
@@ -39,7 +39,7 @@ jobs:
(github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'cu130') (github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'cu130')
strategy: strategy:
matrix: matrix:
python-version: ["3.10"] python-version: ["3.11"]
cuda-version: ["13.0"] cuda-version: ["13.0"]
arch: [x86_64, aarch64] arch: [x86_64, aarch64]
include: include:
@@ -174,8 +174,9 @@ jobs:
matrix: matrix:
python-version: ["3.10"] python-version: ["3.10"]
# ROCm 10.0.0 builds inside a Python 3.12 container; the wheel is still # ROCm 10.0.0 builds inside a Python 3.12 container; the wheel is still
# tagged cp310-abi3 (wheel.py-api in pyproject.toml), so it stays under # tagged cp310-abi3 (build_rocm.sh sets wheel.py-api to cp310 for every
# the same python-version leg as the 7.x wheels. # ROCm flavor), so it stays under the same python-version leg as the 7.x
# wheels.
# #
# A dispatch that names one flavor builds only that flavor. Every extra # A dispatch that names one flavor builds only that flavor. Every extra
# leg is another image build on the shared AMD node, and its release job # leg is another image build on the shared AMD node, and its release job
+1 -1
View File
@@ -50,7 +50,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Unit-test report logic - name: Unit-test report logic
# Pure-logic tests (stdlib only, no API calls) — guards the # Pure-logic tests (stdlib only, no API calls) — guards the
+1 -1
View File
@@ -92,7 +92,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Install dependencies - name: Install dependencies
run: | run: |
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.12'
- name: Update est_time values - name: Update est_time values
env: env:
+15 -1
View File
@@ -56,6 +56,19 @@ if [[ "${ROCM_VERSION}" == "1000" ]]; then
WHEEL_ROCM_VERSION="1000" WHEEL_ROCM_VERSION="1000"
fi fi
# The build reuses the CUDA pyproject.toml, which requires Python 3.11 and tags
# its wheel cp311-abi3. The ROCm 7.2.0 image and amd-sglang still run on Python
# 3.10, so the ROCm wheels keep the Python 3.10 floor and the cp310-abi3 tag.
sed -i \
-e 's/^requires-python = ">=3.11"$/requires-python = ">=3.10"/' \
-e 's/^wheel.py-api = "cp311"$/wheel.py-api = "cp310"/' \
pyproject.toml
if ! grep -qx 'requires-python = ">=3.10"' pyproject.toml \
|| ! grep -qx 'wheel.py-api = "cp310"' pyproject.toml; then
echo "ERROR: could not set the ROCm Python 3.10 / cp310 metadata in pyproject.toml." >&2
exit 1
fi
# Pull and run the latest image # Pull and run the latest image
echo "Pulling Docker image: ${IMAGE}" echo "Pulling Docker image: ${IMAGE}"
docker pull "${IMAGE}" docker pull "${IMAGE}"
@@ -86,5 +99,6 @@ ${ROCM_SETUP}
rm -rf CMakeLists.txt && mv CMakeLists_rocm.txt CMakeLists.txt && \ rm -rf CMakeLists.txt && mv CMakeLists_rocm.txt CMakeLists.txt && \
${PYTHON_ROOT_PATH}/python rocm_hipify.py && \ ${PYTHON_ROOT_PATH}/python rocm_hipify.py && \
${PYTHON_ROOT_PATH}/python -m uv build --wheel -Cbuild-dir=build . --color=always --no-build-isolation && \ ${PYTHON_ROOT_PATH}/python -m uv build --wheel -Cbuild-dir=build . --color=always --no-build-isolation && \
./rename_wheels_rocm.sh ${WHEEL_ROCM_VERSION} ./rename_wheels_rocm.sh ${WHEEL_ROCM_VERSION} && \
${PYTHON_ROOT_PATH}/pip install --dry-run --no-deps dist/*.whl
" "
-2
View File
@@ -30,8 +30,6 @@ dependencies = [
"build", "build",
"compressed-tensors==0.18.0", "compressed-tensors==0.18.0",
"cuda-python>=13.0", "cuda-python>=13.0",
# Transitive dep of flashinfer-python, pinned because 1.6.0rc6 shipped no cp310 linux x86_64 wheel.
"cuda-tile==1.6.0rc5",
"datasets", "datasets",
"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')",
"distro", "distro",
@@ -1,5 +1,5 @@
# /// script # /// script
# requires-python = ">=3.10" # requires-python = ">=3.11"
# dependencies = ["msgspec", "requests", "plotly", "kaleido", "numpy"] # dependencies = ["msgspec", "requests", "plotly", "kaleido", "numpy"]
# /// # ///
from __future__ import annotations from __future__ import annotations
+3 -3
View File
@@ -7,9 +7,9 @@ FROM ${BASE_IMG}:cuda${CUDA_VERSION} AS deps
# Overridable build arguments # Overridable build arguments
ARG ARCH=x86_64 ARG ARCH=x86_64
ARG CUDA_VERSION=13.0 ARG CUDA_VERSION=13.0
ARG PYTHON_VERSION=3.10 ARG PYTHON_VERSION=3.11
# Manylinux python path tag, e.g. cp310-cp310 / cp312-cp312 # Manylinux python path tag, e.g. cp311-cp311 / cp312-cp312
ARG PYTHON_TAG=cp310-cp310 ARG PYTHON_TAG=cp311-cp311
ARG CMAKE_VERSION_MAJOR=3.31 ARG CMAKE_VERSION_MAJOR=3.31
ARG CMAKE_VERSION_MINOR=1 ARG CMAKE_VERSION_MINOR=1
# Install ccache 4.12.1 from source for CUDA support (yum provides old 3.7.7) # Install ccache 4.12.1 from source for CUDA support (yum provides old 3.7.7)
+1 -1
View File
@@ -22,7 +22,7 @@ pip3 install sglang-kernel --upgrade
## Building from Source ## Building from Source
Requires Requires
- CMake ≥3.31, - CMake ≥3.31,
- Python ≥3.10 - Python ≥3.11
- scikit-build-core - scikit-build-core
- ninja(optional) - ninja(optional)
+1 -1
View File
@@ -6,7 +6,7 @@ if [ $# -lt 2 ]; then
exit 1 exit 1
fi fi
PYTHON_VERSION="$1" # e.g. 3.10 PYTHON_VERSION="$1" # e.g. 3.11
CUDA_VERSION="$2" # e.g. 12.9 CUDA_VERSION="$2" # e.g. 12.9
ARCH="${3:-$(uname -i)}" # optional override ARCH="${3:-$(uname -i)}" # optional override
+2 -2
View File
@@ -14,7 +14,7 @@ authors = [
] ]
description = "Kernel Library for SGLang" description = "Kernel Library for SGLang"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.11"
license = { file = "LICENSE" } license = { file = "LICENSE" }
classifiers = [ classifiers = [
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
@@ -37,6 +37,6 @@ exclude = [
cmake.build-type = "Release" cmake.build-type = "Release"
minimum-version = "build-system.requires" minimum-version = "build-system.requires"
wheel.py-api = "cp310" wheel.py-api = "cp311"
wheel.license-files = [] wheel.license-files = []
wheel.packages = ["python/sgl_kernel"] wheel.packages = ["python/sgl_kernel"]
+1 -1
View File
@@ -2,7 +2,7 @@
# Build sgl-deep-gemm wheel inside a CUDA-versioned container. # Build sgl-deep-gemm wheel inside a CUDA-versioned container.
# #
# Usage: build_sgl_deep_gemm.sh <PYTHON_VERSION> <CUDA_VERSION> <DEEPGEMM_SRC> [ARCH] # Usage: build_sgl_deep_gemm.sh <PYTHON_VERSION> <CUDA_VERSION> <DEEPGEMM_SRC> [ARCH]
# PYTHON_VERSION: e.g. 3.10 # PYTHON_VERSION: e.g. 3.12
# CUDA_VERSION: e.g. 13.0 # CUDA_VERSION: e.g. 13.0
# DEEPGEMM_SRC: path to a checkout of sgl-project/DeepGEMM # DEEPGEMM_SRC: path to a checkout of sgl-project/DeepGEMM
# ARCH: x86_64 (default) or aarch64 # ARCH: x86_64 (default) or aarch64
+2 -2
View File
@@ -13,7 +13,7 @@ usage() {
cat <<'EOF' cat <<'EOF'
Usage: build_sgl_deepep.sh <python-version> <cuda-version> <deepep-source> [architecture] Usage: build_sgl_deepep.sh <python-version> <cuda-version> <deepep-source> [architecture]
python-version: 3.10, 3.11, 3.12, or 3.13 python-version: 3.11, 3.12, or 3.13
cuda-version: 13.0 cuda-version: 13.0
deepep-source: DeepEP checkout containing the sgl_deep_ep package deepep-source: DeepEP checkout containing the sgl_deep_ep package
architecture: x86_64 or aarch64 (defaults to the current machine) architecture: x86_64 or aarch64 (defaults to the current machine)
@@ -37,7 +37,7 @@ if [[ "${ARCHITECTURE}" == arm64 ]]; then
fi fi
case "${PYTHON_VERSION}" in case "${PYTHON_VERSION}" in
3.10|3.11|3.12|3.13) ;; 3.11|3.12|3.13) ;;
*) *)
echo "Unsupported Python version: ${PYTHON_VERSION}" >&2 echo "Unsupported Python version: ${PYTHON_VERSION}" >&2
exit 2 exit 2
+1 -1
View File
@@ -679,7 +679,7 @@ install_sglang_kernel() {
else else
WHEEL_ARCH="x86_64" WHEEL_ARCH="x86_64"
fi fi
KERNEL_WHL=$(ls python/sglang/kernels/aot/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}+${CU_VERSION}-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1 || true) KERNEL_WHL=$(ls python/sglang/kernels/aot/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}+${CU_VERSION}-cp311-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1 || true)
if [ -z "$KERNEL_WHL" ]; then if [ -z "$KERNEL_WHL" ]; then
echo "ERROR: No matching sgl-kernel wheel found in python/sglang/kernels/aot/dist/ for version ${SGL_KERNEL_VERSION_FROM_KERNEL} arch ${WHEEL_ARCH} cuda ${CU_VERSION}" echo "ERROR: No matching sgl-kernel wheel found in python/sglang/kernels/aot/dist/ for version ${SGL_KERNEL_VERSION_FROM_KERNEL} arch ${WHEEL_ARCH} cuda ${CU_VERSION}"
ls -alh python/sglang/kernels/aot/dist/ ls -alh python/sglang/kernels/aot/dist/
@@ -9,13 +9,9 @@ Updates:
import re import re
import sys import sys
import tomllib
from pathlib import Path from pathlib import Path
try:
import tomllib # Python 3.11+
except ImportError:
import tomli as tomllib # Fallback for older Python versions
def get_kernel_version_from_source() -> str: def get_kernel_version_from_source() -> str:
"""Extract the version from the AOT source pyproject.""" """Extract the version from the AOT source pyproject."""
@@ -10,13 +10,9 @@ Sets GitHub Actions output variables to indicate if sync is needed.
import os import os
import re import re
import sys import sys
import tomllib
from pathlib import Path from pathlib import Path
try:
import tomllib # Python 3.11+
except ImportError:
import tomli as tomllib # Fallback for older Python versions
def get_kernel_version_from_source() -> str: def get_kernel_version_from_source() -> str:
"""Extract the version from the AOT source pyproject.""" """Extract the version from the AOT source pyproject."""
+1 -5
View File
@@ -1,13 +1,9 @@
import re import re
import sys import sys
import tomllib
from pathlib import Path from pathlib import Path
from typing import List, Tuple from typing import List, Tuple
try:
import tomllib # Python 3.11+
except ImportError:
import tomli as tomllib # Fallback for older Python versions
def normalize_version(version: str) -> str: def normalize_version(version: str) -> str:
"""Remove 'v' prefix from version string if present.""" """Remove 'v' prefix from version string if present."""
+1 -1
View File
@@ -27,7 +27,7 @@ def check_wheel_cuda_version(path_name, target_cuda_version):
return match.group(1) == target_cuda_version return match.group(1) == target_cuda_version
# An untagged wheel is the default-CUDA build, e.g. # An untagged wheel is the default-CUDA build, e.g.
# sglang_kernel-0.4.0-cp310-abi3-manylinux2014_x86_64.whl (PyPI rejects # sglang_kernel-0.4.0-cp311-abi3-manylinux2014_x86_64.whl (PyPI rejects
# local versions, so that upload strips the tag). # local versions, so that upload strips the tag).
return target_cuda_version == DEFAULT_CUDA_VERSION return target_cuda_version == DEFAULT_CUDA_VERSION
+1 -5
View File
@@ -33,11 +33,7 @@ TORCH_PULLING_PACKAGES = frozenset(
def _parse_runtime_base() -> set: def _parse_runtime_base() -> set:
"""Parse runtime_base package names from pyproject_other.toml.""" """Parse runtime_base package names from pyproject_other.toml."""
# Try tomllib (3.11+) or tomli import tomllib
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib # type: ignore[no-redef]
toml_path = Path(__file__).resolve().parents[3] / "python" / "pyproject_other.toml" toml_path = Path(__file__).resolve().parents[3] / "python" / "pyproject_other.toml"
if not toml_path.exists(): if not toml_path.exists():