[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
@@ -1,7 +1,7 @@
|
||||
name: Build and Publish Multi-Arch Docker Images
|
||||
|
||||
# Reusable workflow: builds CUDA 12 + CUDA 13 images for amd64 and arm64,
|
||||
# then creates multi-arch manifests with caller-specified tags.
|
||||
# Reusable workflow: builds CUDA 13 images for amd64 and arm64, then creates
|
||||
# multi-arch manifests with caller-specified tags.
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -26,7 +26,7 @@ on:
|
||||
type: string
|
||||
default: ""
|
||||
tag_config:
|
||||
description: 'JSON array of {"cuda":"cu129|cu130","tags":["tag1","tag2"]}. Tags support {version} substitution.'
|
||||
description: 'JSON array of {"cuda":"cu130","tags":["tag1","tag2"]}. Tags support {version} substitution.'
|
||||
required: true
|
||||
type: string
|
||||
use_environment:
|
||||
@@ -50,7 +50,6 @@ jobs:
|
||||
SGL_VERSION: ${{ inputs.sgl_version }}
|
||||
IMAGE_REPO: ${{ inputs.image_repo }}
|
||||
outputs:
|
||||
digest-cu129: ${{ steps.build-cu129.outputs.digest }}
|
||||
digest-cu130: ${{ steps.build-cu130.outputs.digest }}
|
||||
steps:
|
||||
- name: Delete huge unnecessary tools folder
|
||||
@@ -69,16 +68,14 @@ jobs:
|
||||
set -euo pipefail
|
||||
BUILD_COMMIT="$(git rev-parse HEAD)"
|
||||
BUILD_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||
for CUDA_VARIANT in cu129 cu130; do
|
||||
python3 scripts/ci/utils/docker_build_metadata_args.py \
|
||||
--cuda "${CUDA_VARIANT}" \
|
||||
--tag-config "${TAG_CONFIG}" \
|
||||
--image-repo "${IMAGE_REPO}" \
|
||||
--sgl-version "${SGL_VERSION}" \
|
||||
--build-commit "${BUILD_COMMIT}" \
|
||||
--build-url "${BUILD_URL}" \
|
||||
> "/tmp/docker-metadata-${CUDA_VARIANT}.args"
|
||||
done
|
||||
python3 scripts/ci/utils/docker_build_metadata_args.py \
|
||||
--cuda cu130 \
|
||||
--tag-config "${TAG_CONFIG}" \
|
||||
--image-repo "${IMAGE_REPO}" \
|
||||
--sgl-version "${SGL_VERSION}" \
|
||||
--build-commit "${BUILD_COMMIT}" \
|
||||
--build-url "${BUILD_URL}" \
|
||||
> /tmp/docker-metadata-cu130.args
|
||||
|
||||
- name: Free disk space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
@@ -106,34 +103,6 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push AMD64 image (CUDA 12)
|
||||
id: build-cu129
|
||||
run: |
|
||||
VERSION_ARG=""
|
||||
if [ -n "${SGL_VERSION}" ]; then
|
||||
VERSION_ARG="--build-arg SGL_VERSION=${SGL_VERSION}"
|
||||
fi
|
||||
mapfile -t METADATA_ARGS < /tmp/docker-metadata-cu129.args
|
||||
|
||||
docker buildx build \
|
||||
--target ${{ inputs.docker_target }} \
|
||||
--platform linux/amd64 \
|
||||
--output type=image,name=${{ inputs.image_repo }},push-by-digest=true,name-canonical=true,push=true \
|
||||
-f docker/Dockerfile \
|
||||
--build-arg CUDA_VERSION=12.9.2 \
|
||||
--build-arg BUILD_TYPE=all \
|
||||
--build-arg INSTALL_FLASHINFER_JIT_CACHE=1 \
|
||||
"${METADATA_ARGS[@]}" \
|
||||
${VERSION_ARG} \
|
||||
${{ inputs.extra_build_args }} \
|
||||
--metadata-file /tmp/metadata-cu129.json \
|
||||
--no-cache \
|
||||
.
|
||||
|
||||
DIGEST=$(python3 -c "import json; print(json.load(open('/tmp/metadata-cu129.json'))['containerimage.digest'])")
|
||||
echo "Pushed digest: ${DIGEST}"
|
||||
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push AMD64 image (CUDA 13)
|
||||
id: build-cu130
|
||||
run: |
|
||||
@@ -171,7 +140,6 @@ jobs:
|
||||
SGL_VERSION: ${{ inputs.sgl_version }}
|
||||
IMAGE_REPO: ${{ inputs.image_repo }}
|
||||
outputs:
|
||||
digest-cu129: ${{ steps.build-cu129.outputs.digest }}
|
||||
digest-cu130: ${{ steps.build-cu130.outputs.digest }}
|
||||
steps:
|
||||
- name: Delete huge unnecessary tools folder
|
||||
@@ -190,16 +158,14 @@ jobs:
|
||||
set -euo pipefail
|
||||
BUILD_COMMIT="$(git rev-parse HEAD)"
|
||||
BUILD_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||
for CUDA_VARIANT in cu129 cu130; do
|
||||
python3 scripts/ci/utils/docker_build_metadata_args.py \
|
||||
--cuda "${CUDA_VARIANT}" \
|
||||
--tag-config "${TAG_CONFIG}" \
|
||||
--image-repo "${IMAGE_REPO}" \
|
||||
--sgl-version "${SGL_VERSION}" \
|
||||
--build-commit "${BUILD_COMMIT}" \
|
||||
--build-url "${BUILD_URL}" \
|
||||
> "/tmp/docker-metadata-${CUDA_VARIANT}.args"
|
||||
done
|
||||
python3 scripts/ci/utils/docker_build_metadata_args.py \
|
||||
--cuda cu130 \
|
||||
--tag-config "${TAG_CONFIG}" \
|
||||
--image-repo "${IMAGE_REPO}" \
|
||||
--sgl-version "${SGL_VERSION}" \
|
||||
--build-commit "${BUILD_COMMIT}" \
|
||||
--build-url "${BUILD_URL}" \
|
||||
> /tmp/docker-metadata-cu130.args
|
||||
|
||||
- name: Prune Docker to reclaim disk space
|
||||
run: |
|
||||
@@ -216,34 +182,6 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push ARM64 image (CUDA 12)
|
||||
id: build-cu129
|
||||
run: |
|
||||
VERSION_ARG=""
|
||||
if [ -n "${SGL_VERSION}" ]; then
|
||||
VERSION_ARG="--build-arg SGL_VERSION=${SGL_VERSION}"
|
||||
fi
|
||||
mapfile -t METADATA_ARGS < /tmp/docker-metadata-cu129.args
|
||||
|
||||
docker buildx build \
|
||||
--target ${{ inputs.docker_target }} \
|
||||
--platform linux/arm64 \
|
||||
--output type=image,name=${{ inputs.image_repo }},push-by-digest=true,name-canonical=true,push=true \
|
||||
-f docker/Dockerfile \
|
||||
--build-arg CUDA_VERSION=12.9.2 \
|
||||
--build-arg BUILD_TYPE=all \
|
||||
--build-arg INSTALL_FLASHINFER_JIT_CACHE=1 \
|
||||
"${METADATA_ARGS[@]}" \
|
||||
${VERSION_ARG} \
|
||||
${{ inputs.extra_build_args }} \
|
||||
--metadata-file /tmp/metadata-cu129.json \
|
||||
--no-cache \
|
||||
.
|
||||
|
||||
DIGEST=$(python3 -c "import json; print(json.load(open('/tmp/metadata-cu129.json'))['containerimage.digest'])")
|
||||
echo "Pushed digest: ${DIGEST}"
|
||||
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push ARM64 image (CUDA 13)
|
||||
id: build-cu130
|
||||
run: |
|
||||
@@ -292,22 +230,13 @@ jobs:
|
||||
TAG_CONFIG: ${{ inputs.tag_config }}
|
||||
SGL_VERSION: ${{ inputs.sgl_version }}
|
||||
IMAGE_REPO: ${{ inputs.image_repo }}
|
||||
X86_CU129: ${{ needs.build-x86.outputs.digest-cu129 }}
|
||||
X86_CU130: ${{ needs.build-x86.outputs.digest-cu130 }}
|
||||
ARM64_CU129: ${{ needs.build-arm64.outputs.digest-cu129 }}
|
||||
ARM64_CU130: ${{ needs.build-arm64.outputs.digest-cu130 }}
|
||||
SHORT_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
echo "${TAG_CONFIG}" | jq -c '.[]' | while read -r entry; do
|
||||
CUDA=$(echo "${entry}" | jq -r '.cuda')
|
||||
|
||||
if [ "${CUDA}" = "cu129" ]; then
|
||||
X86_DIGEST="${X86_CU129}"
|
||||
ARM64_DIGEST="${ARM64_CU129}"
|
||||
else
|
||||
X86_DIGEST="${X86_CU130}"
|
||||
ARM64_DIGEST="${ARM64_CU130}"
|
||||
fi
|
||||
X86_DIGEST="${X86_CU130}"
|
||||
ARM64_DIGEST="${ARM64_CU130}"
|
||||
|
||||
TAG_ARGS=""
|
||||
for tag in $(echo "${entry}" | jq -r '.tags[]'); do
|
||||
|
||||
@@ -8,7 +8,7 @@ on:
|
||||
required: false
|
||||
default: ""
|
||||
image_tag:
|
||||
description: "Base image tag to patch (e.g. dev, dev-cu13, dev-cu12)"
|
||||
description: "Base image tag to patch (e.g. dev, dev-cu13)"
|
||||
required: true
|
||||
output_tag:
|
||||
description: "Tag to publish as. Overwrites it if it already exists."
|
||||
|
||||
@@ -25,7 +25,7 @@ on:
|
||||
required: false
|
||||
default: ""
|
||||
overlay_cudas:
|
||||
description: "Comma-separated cuda variants to overlay onto (cu12, cu13). Default 'cu13'."
|
||||
description: "Comma-separated cuda variants to overlay onto (cu13). Default 'cu13'."
|
||||
required: false
|
||||
default: "cu13"
|
||||
overlay_tag_suffix:
|
||||
@@ -86,9 +86,9 @@ jobs:
|
||||
# consumers pinned to the pre-flip names.
|
||||
if [ -z "${SUFFIX}" ]; then
|
||||
# Nightly: include dated tags
|
||||
TAG_CONFIG='[{"cuda":"cu129","tags":["dev-cu12","nightly-dev-cu12-{date}-{short_sha}"]},{"cuda":"cu130","tags":["dev","dev-cu13","nightly-dev-{date}-{short_sha}","nightly-dev-cu13-{date}-{short_sha}"]}]'
|
||||
TAG_CONFIG='[{"cuda":"cu130","tags":["dev","dev-cu13","nightly-dev-{date}-{short_sha}","nightly-dev-cu13-{date}-{short_sha}"]}]'
|
||||
else
|
||||
TAG_CONFIG="[{\"cuda\":\"cu129\",\"tags\":[\"dev-cu12${SUFFIX}\"]},{\"cuda\":\"cu130\",\"tags\":[\"dev${SUFFIX}\",\"dev-cu13${SUFFIX}\"]}]"
|
||||
TAG_CONFIG="[{\"cuda\":\"cu130\",\"tags\":[\"dev${SUFFIX}\",\"dev-cu13${SUFFIX}\"]}]"
|
||||
fi
|
||||
echo "tag_config=${TAG_CONFIG}" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
# SUFFIX was computed above from inputs.tag / inputs.pr_number.
|
||||
if [ -n "${OVERLAY_DOCKERFILE_INPUT}" ]; then
|
||||
# Refuse to overlay without a tag/pr_number: SUFFIX would be empty,
|
||||
# so base would point at the moving 'dev'/'dev-cu12'/'dev-cu13'
|
||||
# so base would point at the moving 'dev'/'dev-cu13'
|
||||
# latest tags and overwrite mode would clobber them.
|
||||
if [ -z "${SUFFIX}" ]; then
|
||||
echo "overlay_dockerfile is set but neither 'tag' nor 'pr_number' was given." >&2
|
||||
@@ -112,10 +112,8 @@ jobs:
|
||||
C="$(echo "${C}" | xargs)"
|
||||
if [ "${C}" = "cu13" ]; then
|
||||
BASES='["dev'"${SUFFIX}"'","dev-cu13'"${SUFFIX}"'"]'
|
||||
elif [ "${C}" = "cu12" ]; then
|
||||
BASES='["dev-cu12'"${SUFFIX}"'"]'
|
||||
else
|
||||
echo "Unknown overlay cuda variant: ${C} (expected cu12 or cu13)" >&2
|
||||
echo "Unknown overlay cuda variant: ${C} (expected cu13)" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "${OVERLAY_SUFFIX_INPUT}" ]; then
|
||||
@@ -213,7 +211,7 @@ jobs:
|
||||
if: ${{ !inputs.build_only && !inputs.tag && !inputs.pr_number }}
|
||||
uses: ./.github/workflows/_docker-cleanup-nightly.yml
|
||||
with:
|
||||
tag_prefixes: '["nightly-dev", "nightly-dev-cu12", "nightly-dev-cu13"]'
|
||||
tag_prefixes: '["nightly-dev", "nightly-dev-cu13"]'
|
||||
image_repo: ${{ inputs.image_repo || 'lmsysorg/sglang' }}
|
||||
secrets: inherit
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Release Docker Runtime Images
|
||||
#
|
||||
# Builds and publishes runtime Docker images (production-optimized, ~50% smaller):
|
||||
# - lmsysorg/sglang:v{version}-runtime, lmsysorg/sglang:latest-runtime
|
||||
# - lmsysorg/sglang:v{version}-cu129-runtime, lmsysorg/sglang:latest-cu129-runtime
|
||||
# - lmsysorg/sglang:v{version}-cu130-runtime, lmsysorg/sglang:latest-cu130-runtime
|
||||
#
|
||||
on:
|
||||
push:
|
||||
@@ -49,7 +49,6 @@ jobs:
|
||||
image_repo: ${{ inputs.image_repo || 'lmsysorg/sglang' }}
|
||||
tag_config: |
|
||||
[
|
||||
{"cuda": "cu130", "tags": ["v${{ needs.resolve-version.outputs.version }}-runtime", "latest-runtime", "v${{ needs.resolve-version.outputs.version }}-cu130-runtime", "latest-cu130-runtime"]},
|
||||
{"cuda": "cu129", "tags": ["v${{ needs.resolve-version.outputs.version }}-cu129-runtime", "latest-cu129-runtime"]}
|
||||
{"cuda": "cu130", "tags": ["v${{ needs.resolve-version.outputs.version }}-runtime", "latest-runtime", "v${{ needs.resolve-version.outputs.version }}-cu130-runtime", "latest-cu130-runtime"]}
|
||||
]
|
||||
secrets: inherit
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Release Docker Images
|
||||
#
|
||||
# Builds and publishes framework Docker images (full development environment):
|
||||
# - lmsysorg/sglang:v{version}, lmsysorg/sglang:latest (cuda 13)
|
||||
# - lmsysorg/sglang:v{version}-cu129, lmsysorg/sglang:latest-cu129
|
||||
# - lmsysorg/sglang:v{version}-cu130, lmsysorg/sglang:latest-cu130
|
||||
#
|
||||
on:
|
||||
push:
|
||||
@@ -49,7 +49,6 @@ jobs:
|
||||
image_repo: ${{ inputs.image_repo || 'lmsysorg/sglang' }}
|
||||
tag_config: |
|
||||
[
|
||||
{"cuda": "cu130", "tags": ["v${{ needs.resolve-version.outputs.version }}", "latest", "v${{ needs.resolve-version.outputs.version }}-cu130", "latest-cu130"]},
|
||||
{"cuda": "cu129", "tags": ["v${{ needs.resolve-version.outputs.version }}-cu129", "latest-cu129"]}
|
||||
{"cuda": "cu130", "tags": ["v${{ needs.resolve-version.outputs.version }}", "latest", "v${{ needs.resolve-version.outputs.version }}-cu130", "latest-cu130"]}
|
||||
]
|
||||
secrets: inherit
|
||||
|
||||
@@ -113,13 +113,13 @@ jobs:
|
||||
environment: 'prod'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# The wheel is CUDA-agnostic and built once — we just register the same
|
||||
# artifact under cu129/sglang/ and cu130/sglang/ wheel indexes so users
|
||||
# can install via either --extra-index-url. Serialize because both matrix
|
||||
# runs clone and push to the same sgl-whl branch.
|
||||
# The wheel is CUDA-agnostic and built once — we just register it under
|
||||
# the cu130/sglang/ wheel index so users can install via
|
||||
# --extra-index-url. Serialize because matrix runs clone and push to the
|
||||
# same sgl-whl branch.
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
cuda_version: ['129', '130']
|
||||
cuda_version: ['130']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
@@ -7,15 +7,6 @@ on:
|
||||
description: "Public wheel version (for example, 0.1.0 or 0.1.1rc0)"
|
||||
type: string
|
||||
required: true
|
||||
target:
|
||||
description: "CUDA target"
|
||||
type: choice
|
||||
required: false
|
||||
default: "all"
|
||||
options:
|
||||
- "all"
|
||||
- "cu129"
|
||||
- "cu130"
|
||||
packaging-ref:
|
||||
description: "DeepEP ref containing the shared sgl_deep_ep overlay"
|
||||
type: string
|
||||
@@ -30,75 +21,8 @@ env:
|
||||
TORCH_VERSION: "2.13.0"
|
||||
|
||||
jobs:
|
||||
build-cu129-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
(inputs.target == 'all' || inputs.target == 'cu129')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.12"]
|
||||
arch: [x86_64, aarch64]
|
||||
include:
|
||||
- arch: x86_64
|
||||
runner: x64-kernel-build-node
|
||||
source-branch: sgl-deepep-cu12-x86
|
||||
- arch: aarch64
|
||||
runner: arm-kernel-build-node
|
||||
source-branch: sgl-deepep-cu12-arm
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Clean workspace
|
||||
run: |
|
||||
docker run --rm -v "${{ github.workspace }}:/workspace" alpine:3 \
|
||||
sh -c 'rm -rf /workspace/..?* /workspace/.[!.]* /workspace/*' || true
|
||||
|
||||
- name: Checkout SGLang
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout DeepEP implementation
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sgl-project/DeepEP
|
||||
ref: ${{ matrix.source-branch }}
|
||||
path: DeepEP-source
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout DeepEP packaging overlay
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sgl-project/DeepEP
|
||||
ref: ${{ inputs['packaging-ref'] || 'sgl-deepep-packaging' }}
|
||||
path: DeepEP-packaging
|
||||
sparse-checkout: sgl_deep_ep
|
||||
|
||||
- name: Set wheel version
|
||||
env:
|
||||
RELEASE_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
printf '%s' "${RELEASE_VERSION}" > DeepEP-packaging/sgl_deep_ep/VERSION
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
chmod +x scripts/build_sgl_deepep.sh DeepEP-packaging/sgl_deep_ep/build_sgl_deep_ep.sh
|
||||
scripts/build_sgl_deepep.sh \
|
||||
"${{ matrix.python-version }}" \
|
||||
"12.9" \
|
||||
"${{ github.workspace }}/DeepEP-source" \
|
||||
"${{ github.workspace }}/DeepEP-packaging/sgl_deep_ep" \
|
||||
"${{ matrix.arch }}"
|
||||
|
||||
- name: Upload wheel
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deepep-wheel-cu129-py${{ matrix.python-version }}-${{ matrix.arch }}
|
||||
path: DeepEP-source/dist/*.whl
|
||||
if-no-files-found: error
|
||||
|
||||
build-cu130-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
(inputs.target == 'all' || inputs.target == 'cu130')
|
||||
if: github.repository == 'sgl-project/sglang'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -168,19 +92,10 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
release-whl:
|
||||
needs: [build-cu129-matrix, build-cu130-matrix]
|
||||
needs: build-cu130-matrix
|
||||
if: |
|
||||
always() &&
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
(
|
||||
(inputs.target == 'cu129' && needs.build-cu129-matrix.result == 'success') ||
|
||||
(inputs.target == 'cu130' && needs.build-cu130-matrix.result == 'success') ||
|
||||
(
|
||||
inputs.target == 'all' &&
|
||||
needs.build-cu129-matrix.result == 'success' &&
|
||||
needs.build-cu130-matrix.result == 'success'
|
||||
)
|
||||
)
|
||||
needs.build-cu130-matrix.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout SGLang
|
||||
@@ -209,14 +124,8 @@ jobs:
|
||||
git clone --branch gh-pages \
|
||||
"https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git" sgl-whl
|
||||
|
||||
- name: Update wheel indexes
|
||||
run: |
|
||||
if [[ "${{ inputs.target }}" == "all" || "${{ inputs.target }}" == "cu129" ]]; then
|
||||
python3 scripts/update_deepep_whl_index.py --cuda 129
|
||||
fi
|
||||
if [[ "${{ inputs.target }}" == "all" || "${{ inputs.target }}" == "cu130" ]]; then
|
||||
python3 scripts/update_deepep_whl_index.py --cuda 130
|
||||
fi
|
||||
- name: Update wheel index
|
||||
run: python3 scripts/update_deepep_whl_index.py --cuda 130
|
||||
|
||||
- name: Push wheel indexes
|
||||
env:
|
||||
@@ -234,15 +143,10 @@ jobs:
|
||||
fi
|
||||
|
||||
release-pypi:
|
||||
needs: [build-cu129-matrix, build-cu130-matrix]
|
||||
needs: build-cu130-matrix
|
||||
if: |
|
||||
always() &&
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
needs.build-cu130-matrix.result == 'success' &&
|
||||
(
|
||||
inputs.target == 'cu130' ||
|
||||
(inputs.target == 'all' && needs.build-cu129-matrix.result == 'success')
|
||||
)
|
||||
needs.build-cu130-matrix.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download PyPI wheels
|
||||
|
||||
@@ -14,7 +14,6 @@ on:
|
||||
default: 'all'
|
||||
options:
|
||||
- 'all'
|
||||
- 'cu129'
|
||||
- 'cu130'
|
||||
branch:
|
||||
description: "DeepGEMM branch to build from (default: dev)"
|
||||
@@ -33,92 +32,6 @@ env:
|
||||
TORCH_VER: "2.13.0"
|
||||
|
||||
jobs:
|
||||
build-cu129-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
(github.event.inputs.target == 'all' || github.event.inputs.target == 'cu129')
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.12"]
|
||||
cuda-version: ["12.9"]
|
||||
arch: [x86_64, aarch64]
|
||||
include:
|
||||
- arch: x86_64
|
||||
runner: x64-kernel-build-node
|
||||
- arch: aarch64
|
||||
runner: arm-kernel-build-node
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Clean workspace (remove root-owned files from prior runs)
|
||||
run: |
|
||||
docker run --rm -v "${{ github.workspace }}:/workspace" alpine:3 \
|
||||
sh -c 'rm -rf /workspace/..?* /workspace/.[!.]* /workspace/*' || true
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout DeepGEMM
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sgl-project/DeepGEMM
|
||||
ref: ${{ inputs.branch || 'dev' }}
|
||||
path: DeepGEMM
|
||||
submodules: recursive
|
||||
|
||||
- name: Set wheel version
|
||||
run: |
|
||||
echo -n "${{ inputs.version }}" > DeepGEMM/sgl_deep_gemm/VERSION
|
||||
cat DeepGEMM/sgl_deep_gemm/VERSION
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
chmod +x ./scripts/build_sgl_deep_gemm.sh ./scripts/rename_sgl_deep_gemm_whl.sh
|
||||
./scripts/build_sgl_deep_gemm.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" "${{ github.workspace }}/DeepGEMM" "${{ matrix.arch }}"
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deepgemm-wheel-cuda${{ matrix.cuda-version }}-${{ matrix.arch }}
|
||||
path: DeepGEMM/dist/*.whl
|
||||
|
||||
release-cu129:
|
||||
needs: build-cu129-matrix
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist/
|
||||
merge-multiple: true
|
||||
pattern: deepgemm-wheel-cuda12.9-*
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ inputs.version }}
|
||||
repository: sgl-project/whl
|
||||
token: ${{ secrets.GH_PAT_FOR_WHL_RELEASE }}
|
||||
files: |
|
||||
dist/*
|
||||
|
||||
- name: Clone wheel index
|
||||
run: git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl
|
||||
env:
|
||||
WHL_TOKEN: ${{ secrets.GH_PAT_FOR_WHL_RELEASE }}
|
||||
|
||||
- name: Update wheel index
|
||||
run: python3 scripts/update_deepgemm_whl_index.py --cuda 129
|
||||
|
||||
- name: Push wheel index
|
||||
run: |
|
||||
cd sgl-whl
|
||||
git config --local user.name "sglang-bot"
|
||||
git config --local user.email "sglangbot@gmail.com"
|
||||
git add -A
|
||||
git commit -m "update sgl-deep-gemm whl index for v${{ inputs.version }}"
|
||||
git push
|
||||
|
||||
build-cu130-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
|
||||
@@ -15,7 +15,6 @@ on:
|
||||
default: 'all'
|
||||
options:
|
||||
- 'all'
|
||||
- 'cu129'
|
||||
- 'cu130'
|
||||
- 'rocm700'
|
||||
- 'rocm720'
|
||||
@@ -35,110 +34,6 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# cu130 is the PyPI-released variant; cu129 wheels are published only to the
|
||||
# sgl-project/whl index (consumed via `pip install ...+cu129` for the legacy
|
||||
# cuda 12.9 path), not to PyPI.
|
||||
build-cu129-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
(github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'cu129')
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10"]
|
||||
cuda-version: ["12.9"]
|
||||
arch: [x86_64, aarch64]
|
||||
include:
|
||||
- arch: x86_64
|
||||
runner: x64-kernel-build-node
|
||||
- arch: aarch64
|
||||
runner: arm-kernel-build-node
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
# Self-hosted build nodes retain the workspace across jobs. Prior builds
|
||||
# leave root-owned artifacts under python/sglang/kernels/aot/build/ that actions/checkout
|
||||
# cannot remove, causing EACCES on rmdir. Wipe them via a throwaway root
|
||||
# container before checkout recreates the workspace.
|
||||
- name: Clean workspace (remove root-owned files from prior runs)
|
||||
run: |
|
||||
docker run --rm -v "${{ github.workspace }}:/workspace" alpine:3 \
|
||||
sh -c 'rm -rf /workspace/..?* /workspace/.[!.]* /workspace/*' || true
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "recursive"
|
||||
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Build wheels
|
||||
run: |
|
||||
cd python/sglang/kernels/aot
|
||||
chmod +x ./build.sh
|
||||
./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" ${{ matrix.arch == 'aarch64' && 'aarch64' || '' }}
|
||||
env:
|
||||
BUILD_JOBS: 64
|
||||
NVCC_THREADS: 8
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel-python${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}
|
||||
path: python/sglang/kernels/aot/dist/*
|
||||
|
||||
release-cu129:
|
||||
needs: build-cu129-matrix
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: python/sglang/kernels/aot/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 python/sglang/kernels/aot/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.GH_PAT_FOR_WHL_RELEASE }}
|
||||
files: |
|
||||
python/sglang/kernels/aot/dist/*
|
||||
|
||||
- name: Clone wheel index
|
||||
run: git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl
|
||||
env:
|
||||
WHL_TOKEN: ${{ secrets.GH_PAT_FOR_WHL_RELEASE }}
|
||||
|
||||
- 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 "sglang-bot"
|
||||
git config --local user.email "sglangbot@gmail.com"
|
||||
git add -A
|
||||
git commit -m "update whl index"
|
||||
git push
|
||||
|
||||
build-cu130-matrix:
|
||||
if: |
|
||||
github.repository == 'sgl-project/sglang' &&
|
||||
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
source_tag:
|
||||
description: "Existing image tag (e.g., v0.4.7-cu129-amd64)"
|
||||
description: "Existing image tag (e.g., v0.4.7-cu130-amd64)"
|
||||
required: true
|
||||
target_tag:
|
||||
description: "New tag to apply (e.g., latest)"
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
tag: ${{ inputs.tag && fromJSON(format('["{0}"]', inputs.tag)) || fromJSON('["dev", "dev-cu12"]') }}
|
||||
tag: ${{ inputs.tag && fromJSON(format('["{0}"]', inputs.tag)) || fromJSON('["dev", "dev-cu13"]') }}
|
||||
steps:
|
||||
- name: Cleanup workspace (remove root-owned files from prior runs)
|
||||
run: sudo rm -rf "$GITHUB_WORKSPACE"/* || true
|
||||
|
||||
Reference in New Issue
Block a user