From de8b8b6e5cec42d91e9b7cc3cad849f36f424545 Mon Sep 17 00:00:00 2001 From: ishandhanani <82981111+ishandhanani@users.noreply.github.com> Date: Sat, 9 Aug 2025 00:30:23 -0700 Subject: [PATCH] chore(deps): update minimum python to 3.10 (#8984) --- .github/workflows/lint.yml | 4 +- .github/workflows/pr-test-sgl-kernel.yml | 4 +- .github/workflows/release-docs.yml | 6 +- .github/workflows/release-pypi.yml | 4 +- .../workflows/release-whl-kernel-aarch64.yml | 96 ------------------- .../workflows/release-whl-kernel-cu118.yml | 6 +- .github/workflows/release-whl-kernel.yml | 96 +++++++++++++++++-- python/pyproject.toml | 2 +- sgl-kernel/pyproject.toml | 4 +- sgl-kernel/pyproject_cpu.toml | 2 +- sgl-kernel/pyproject_rocm.toml | 2 +- 11 files changed, 104 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/release-whl-kernel-aarch64.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 405410300..3a281299a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [ pull_request ] +on: [pull_request] jobs: lint: @@ -11,7 +11,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.10" - name: Install pre-commit hook run: | diff --git a/.github/workflows/pr-test-sgl-kernel.yml b/.github/workflows/pr-test-sgl-kernel.yml index 8904aa64e..a3c84a539 100644 --- a/.github/workflows/pr-test-sgl-kernel.yml +++ b/.github/workflows/pr-test-sgl-kernel.yml @@ -80,7 +80,7 @@ jobs: with: path: sgl-kernel/dist/ merge-multiple: true - pattern: wheel-python3.9-cuda12.4 + pattern: wheel-python3.10-cuda12.4 - name: Install run: | @@ -112,7 +112,7 @@ jobs: with: path: sgl-kernel/dist/ merge-multiple: true - pattern: wheel-python3.9-cuda12.4 + pattern: wheel-python3.10-cuda12.4 - name: Install run: | diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index d5ca23ecb..591cd5bdf 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -5,8 +5,8 @@ on: branches: - main paths: - - 'docs/**' - - 'python/sglang/version.py' + - "docs/**" + - "python/sglang/version.py" - "python/sglang/**" workflow_dispatch: @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | - find /public_sglang_ci/runner-a-gpu-1/_work/_tool/Python/3.9.21/x64/lib/python3.9/site-packages -name "sgl-kernel*" -exec rm -rf {} + || true + find /public_sglang_ci/runner-a-gpu-1/_work/_tool/Python/3.10.13/x64/lib/python3.10/site-packages -name "sgl-kernel*" -exec rm -rf {} + || true bash scripts/ci_install_dependency.sh pip install -r docs/requirements.txt apt-get update diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index b0f8814ca..354ee21d1 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -11,12 +11,12 @@ jobs: publish: if: github.repository == 'sgl-project/sglang' runs-on: ubuntu-latest - environment: 'prod' + environment: "prod" steps: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.10" - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/release-whl-kernel-aarch64.yml b/.github/workflows/release-whl-kernel-aarch64.yml deleted file mode 100644 index 5c0c09794..000000000 --- a/.github/workflows/release-whl-kernel-aarch64.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: Release SGLang Kernels (aarch64) - -on: - push: - branches: - - main - paths: - - sgl-kernel/python/sgl_kernel/version.py - workflow_dispatch: - inputs: - tag_name: - type: string - required: false - -concurrency: - group: release-sglang-kernels-aarch64-${{ github.ref }} - cancel-in-progress: true - -jobs: - build-cu129-aarch64: - if: github.repository == 'sgl-project/sglang' - runs-on: sgl-kernel-release-node-arm - strategy: - matrix: - python-version: ["3.10"] - cuda-version: ["12.9"] - steps: - - uses: actions/checkout@v4 - with: - submodules: "recursive" - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Build wheels - run: | - cd sgl-kernel - chmod +x ./build.sh - ./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" aarch64 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: wheel-python${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-aarch64 - path: sgl-kernel/dist/* - - release: - needs: build-cu129-aarch64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: sgl-kernel/dist/ - merge-multiple: true - pattern: wheel-* - - - name: Set tag name - id: set_tag_name - run: | - if [ -z "${{ inputs.tag_name }}" ]; then - TAG_NAME="v$(cat sgl-kernel/python/sgl_kernel/version.py | cut -d'"' -f2)" - echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - else - echo "tag_name=${{ inputs.tag_name }}" >> $GITHUB_OUTPUT - fi - - - name: Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ steps.set_tag_name.outputs.tag_name }} - repository: sgl-project/whl - token: ${{ secrets.WHL_TOKEN }} - files: | - sgl-kernel/dist/* - - - name: Clone wheel index - run: git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl - env: - WHL_TOKEN: ${{ secrets.WHL_TOKEN }} - - - name: Update wheel index - run: python3 scripts/update_kernel_whl_index.py --cuda 129 - - - name: Push wheel index - run: | - cd sgl-whl - git config --local user.name "github-actions[bot]" - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add -A - git commit -m "update whl index" - git push diff --git a/.github/workflows/release-whl-kernel-cu118.yml b/.github/workflows/release-whl-kernel-cu118.yml index 09b154e6f..4757bcaa1 100644 --- a/.github/workflows/release-whl-kernel-cu118.yml +++ b/.github/workflows/release-whl-kernel-cu118.yml @@ -17,13 +17,13 @@ jobs: runs-on: sgl-kernel-release-node strategy: matrix: - python-version: ['3.9'] - cuda-version: ['11.8'] + python-version: ["3.9"] + cuda-version: ["11.8"] steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 diff --git a/.github/workflows/release-whl-kernel.yml b/.github/workflows/release-whl-kernel.yml index 599f2563a..c9c44b520 100644 --- a/.github/workflows/release-whl-kernel.yml +++ b/.github/workflows/release-whl-kernel.yml @@ -22,12 +22,12 @@ jobs: runs-on: sgl-kernel-release-node strategy: matrix: - python-version: ['3.9'] - cuda-version: ['12.4'] + python-version: ["3.10"] + cuda-version: ["12.4"] steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -52,12 +52,12 @@ jobs: runs-on: sgl-kernel-release-node strategy: matrix: - python-version: ['3.9'] - cuda-version: ['12.9'] + python-version: ["3.10"] + cuda-version: ["12.9"] steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -131,12 +131,12 @@ jobs: runs-on: sgl-kernel-release-node strategy: matrix: - python-version: ['3.9'] - cuda-version: ['12.8'] + python-version: ["3.10"] + cuda-version: ["12.8"] steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -203,3 +203,81 @@ jobs: git add -A git commit -m "update whl index" git push + + build-cu129-aarch64: + if: github.repository == 'sgl-project/sglang' + runs-on: sgl-kernel-release-node-arm + strategy: + matrix: + python-version: ["3.10"] + cuda-version: ["12.9"] + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Build wheels + run: | + cd sgl-kernel + chmod +x ./build.sh + ./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" aarch64 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: wheel-python${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-aarch64 + path: sgl-kernel/dist/* + + release-cu129-aarch64: + needs: build-cu129-aarch64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: sgl-kernel/dist/ + merge-multiple: true + pattern: wheel-* + + - name: Set tag name + id: set_tag_name + run: | + if [ -z "${{ inputs.tag_name }}" ]; then + TAG_NAME="v$(cat sgl-kernel/python/sgl_kernel/version.py | cut -d'"' -f2)" + echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT + else + echo "tag_name=${{ inputs.tag_name }}" >> $GITHUB_OUTPUT + fi + + - name: Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.set_tag_name.outputs.tag_name }} + repository: sgl-project/whl + token: ${{ secrets.WHL_TOKEN }} + files: | + sgl-kernel/dist/* + + - name: Clone wheel index + run: git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl + env: + WHL_TOKEN: ${{ secrets.WHL_TOKEN }} + + - name: Update wheel index + run: python3 scripts/update_kernel_whl_index.py --cuda 129 + + - name: Push wheel index + run: | + cd sgl-whl + git config --local user.name "github-actions[bot]" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "update whl index" + git push diff --git a/python/pyproject.toml b/python/pyproject.toml index 376c8b2d5..ea02e8d27 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ name = "sglang" version = "0.5.0rc0" description = "SGLang is yet another fast serving framework for large language models and vision language models." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE" } classifiers = [ "Programming Language :: Python :: 3", diff --git a/sgl-kernel/pyproject.toml b/sgl-kernel/pyproject.toml index cf19f5b74..cd04d228d 100644 --- a/sgl-kernel/pyproject.toml +++ b/sgl-kernel/pyproject.toml @@ -11,7 +11,7 @@ name = "sgl-kernel" version = "0.3.3" description = "Kernel Library for SGLang" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE" } classifiers = [ "Programming Language :: Python :: 3", @@ -34,6 +34,6 @@ exclude = [ cmake.build-type = "Release" minimum-version = "build-system.requires" -wheel.py-api = "cp39" +wheel.py-api = "cp310" wheel.license-files = [] wheel.packages = ["python/sgl_kernel"] diff --git a/sgl-kernel/pyproject_cpu.toml b/sgl-kernel/pyproject_cpu.toml index 49376af64..afe8d4452 100644 --- a/sgl-kernel/pyproject_cpu.toml +++ b/sgl-kernel/pyproject_cpu.toml @@ -11,7 +11,7 @@ name = "sgl-kernel" version = "0.3.3" description = "Kernel Library for SGLang" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE" } classifiers = [ "Programming Language :: Python :: 3", diff --git a/sgl-kernel/pyproject_rocm.toml b/sgl-kernel/pyproject_rocm.toml index dd2d6e1cd..480cc9a2c 100644 --- a/sgl-kernel/pyproject_rocm.toml +++ b/sgl-kernel/pyproject_rocm.toml @@ -12,7 +12,7 @@ name = "sgl-kernel" version = "0.3.3" description = "Kernel Library for SGLang" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE" } classifiers = [ "Programming Language :: Python :: 3",