[AMD][CI] Publish ROCm 10 release images and kernel wheel (#38763)

This commit is contained in:
Michael
2026-09-09 23:57:00 -07:00
committed by GitHub
parent a1ec35a330
commit f3152439d0
4 changed files with 138 additions and 8 deletions
+17 -3
View File
@@ -15,6 +15,7 @@ on:
default: 'all'
options:
- 'all'
- rocm10
- rocm724
- rocm720
- rocm700
@@ -25,11 +26,11 @@ jobs:
runs-on: amd-docker-scale
environment: 'prod'
strategy:
# Six flavors publish independently: a failure in one must not cancel the
# others mid-push and leave the release tag with a partial image set.
# Eight flavors publish independently: a failure in one must not cancel
# the others mid-push and leave the release tag with a partial image set.
fail-fast: false
matrix:
rocm_version: ${{ fromJson((github.event_name == 'workflow_dispatch' && inputs.rocm_version != 'all' && inputs.rocm_version != '') && format('["{0}"]', inputs.rocm_version) || '["rocm700", "rocm720", "rocm724"]') }}
rocm_version: ${{ fromJson((github.event_name == 'workflow_dispatch' && inputs.rocm_version != 'all' && inputs.rocm_version != '') && format('["{0}"]', inputs.rocm_version) || '["rocm700", "rocm720", "rocm724", "rocm10"]') }}
gpu_arch: ['gfx942', 'gfx950']
build_type: ['all']
steps:
@@ -89,6 +90,19 @@ jobs:
echo "Unsupported gfx arch"
exit 1
fi
elif [ "${{ matrix.rocm_version }}" = "rocm10" ]; then
# The Dockerfile stages carry the full SDK version (gfx942-rocm1000)
# while the published tag keeps the rocm10 flavor name that CI and
# the nightly images already use.
gpu_arch_suffix="-rocm1000"
if [ "${{ matrix.gpu_arch }}" = "gfx942" ]; then
rocm_tag="rocm10-mi30x"
elif [ "${{ matrix.gpu_arch }}" = "gfx950" ]; then
rocm_tag="rocm10-mi35x"
else
echo "Unsupported gfx arch"
exit 1
fi
else
echo "Unsupported rocm version"
exit 1
+66 -2
View File
@@ -19,6 +19,7 @@ on:
- 'cu130'
- 'rocm700'
- 'rocm720'
- 'rocm1000'
- 'musa43'
tag_name:
description: "Version number, must be in the form of vX.Y.Z (e.g. v0.4.0)"
@@ -273,12 +274,20 @@ jobs:
build-rocm-matrix:
if: |
github.repository == 'sgl-project/sglang' &&
(github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'rocm700' || github.event.inputs.target == 'rocm720')
(github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'rocm700' || github.event.inputs.target == 'rocm720' || github.event.inputs.target == 'rocm1000')
runs-on: amd-docker-scale
strategy:
matrix:
python-version: ["3.10"]
rocm-version: ["700", "720"]
# 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
# the same python-version leg as the 7.x wheels.
#
# 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
# appends the same wheel to the index a second time. `inputs` is empty
# on push, which falls through to the full set.
rocm-version: ${{ fromJson(inputs.target == 'rocm700' && '["700"]' || inputs.target == 'rocm720' && '["720"]' || inputs.target == 'rocm1000' && '["1000"]' || '["700", "720", "1000"]') }}
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
@@ -314,6 +323,8 @@ jobs:
release-rocm700:
needs: build-rocm-matrix
# Only publish the flavors this run built; see build-rocm-matrix.
if: ${{ github.event_name == 'push' || inputs.target == 'all' || inputs.target == 'rocm700' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -365,6 +376,7 @@ jobs:
release-rocm720:
needs: build-rocm-matrix
if: ${{ github.event_name == 'push' || inputs.target == 'all' || inputs.target == 'rocm720' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -414,6 +426,58 @@ jobs:
git commit -m "update whl index"
git push
release-rocm1000:
needs: build-rocm-matrix
if: ${{ github.event_name == 'push' || inputs.target == 'all' || inputs.target == 'rocm1000' }}
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-*-rocm1000
- 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 --rocm 1000
- 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-musa43:
if: |
github.repository == 'sgl-project/sglang' &&