[AMD][CI] Retire the ROCm 7.0 kernel wheel (#38767)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: quitenode <quitenode@users.noreply.github.com>
This commit is contained in:
co-authored by
Cursor Agent
quitenode
parent
00143e9c23
commit
d006f40e24
@@ -16,7 +16,6 @@ on:
|
|||||||
options:
|
options:
|
||||||
- 'all'
|
- 'all'
|
||||||
- 'cu130'
|
- 'cu130'
|
||||||
- 'rocm700'
|
|
||||||
- 'rocm720'
|
- 'rocm720'
|
||||||
- 'rocm1000'
|
- 'rocm1000'
|
||||||
- 'musa43'
|
- 'musa43'
|
||||||
@@ -169,7 +168,7 @@ jobs:
|
|||||||
build-rocm-matrix:
|
build-rocm-matrix:
|
||||||
if: |
|
if: |
|
||||||
github.repository == 'sgl-project/sglang' &&
|
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.inputs.target == 'rocm1000')
|
(github.event_name == 'push' || github.event.inputs.target == 'all' || github.event.inputs.target == 'rocm720' || github.event.inputs.target == 'rocm1000')
|
||||||
runs-on: amd-docker-scale
|
runs-on: amd-docker-scale
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -182,7 +181,7 @@ jobs:
|
|||||||
# 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
|
||||||
# appends the same wheel to the index a second time. `inputs` is empty
|
# appends the same wheel to the index a second time. `inputs` is empty
|
||||||
# on push, which falls through to the full set.
|
# 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"]') }}
|
rocm-version: ${{ fromJson(inputs.target == 'rocm720' && '["720"]' || inputs.target == 'rocm1000' && '["1000"]' || '["720", "1000"]') }}
|
||||||
steps:
|
steps:
|
||||||
# Self-hosted build nodes retain the workspace across jobs. Prior builds
|
# Self-hosted build nodes retain the workspace across jobs. Prior builds
|
||||||
# leave root-owned artifacts under python/sglang/kernels/aot/build/ that actions/checkout
|
# leave root-owned artifacts under python/sglang/kernels/aot/build/ that actions/checkout
|
||||||
@@ -216,59 +215,6 @@ jobs:
|
|||||||
name: wheel-python${{ matrix.python-version }}-rocm${{ matrix.rocm-version }}
|
name: wheel-python${{ matrix.python-version }}-rocm${{ matrix.rocm-version }}
|
||||||
path: python/sglang/kernels/aot/dist/*
|
path: python/sglang/kernels/aot/dist/*
|
||||||
|
|
||||||
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
|
|
||||||
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-*-rocm700
|
|
||||||
|
|
||||||
- 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 700
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
release-rocm720:
|
release-rocm720:
|
||||||
needs: build-rocm-matrix
|
needs: build-rocm-matrix
|
||||||
if: ${{ github.event_name == 'push' || inputs.target == 'all' || inputs.target == 'rocm720' }}
|
if: ${{ github.event_name == 'push' || inputs.target == 'all' || inputs.target == 'rocm720' }}
|
||||||
|
|||||||
Vendored
+3
-13
@@ -4,7 +4,7 @@ Building and releasing `sglang-kernel` as a wheel is a part of the release workf
|
|||||||
|
|
||||||
# sglang
|
# sglang
|
||||||
|
|
||||||
`3rdparty/amd/wheel/sglang/pyproject.toml` is the AMD-specific pyproject for building the `amd-sglang` wheel. It extends `python/pyproject_other.toml` with two ROCm-version extras (`rocm700`, `rocm720`) that pin the matching torch/triton/torchaudio/torchvision/`sglang-kernel` wheels, and renames the package to `amd-sglang`.
|
`3rdparty/amd/wheel/sglang/pyproject.toml` is the AMD-specific pyproject for building the `amd-sglang` wheel. It extends `python/pyproject_other.toml` with a `rocm720` extra that pins the matching torch/triton/torchaudio/torchvision/`sglang-kernel` wheels, and renames the package to `amd-sglang`.
|
||||||
|
|
||||||
## Operation to build sglang wheel
|
## Operation to build sglang wheel
|
||||||
|
|
||||||
@@ -18,12 +18,6 @@ $ cd python && python -m build
|
|||||||
|
|
||||||
### v0.5.9
|
### v0.5.9
|
||||||
|
|
||||||
ROCm 7.0.0:
|
|
||||||
```
|
|
||||||
pip uninstall sglang-kernel sglang amd-sglang
|
|
||||||
pip install "amd-sglang[all-hip,rocm700]" -i https://pypi.amd.com/rocm-7.0.0/simple --extra-index-url https://pypi.org/simple
|
|
||||||
```
|
|
||||||
|
|
||||||
ROCm 7.2.0:
|
ROCm 7.2.0:
|
||||||
```
|
```
|
||||||
pip uninstall sglang-kernel sglang amd-sglang
|
pip uninstall sglang-kernel sglang amd-sglang
|
||||||
@@ -39,13 +33,9 @@ Note: You must resolve the two dependencies, AITER and triton, below. Others ar
|
|||||||
[AITER](https://github.com/ROCm/aiter) is a fundamental dependency. Wheel-izing it is ongoing.
|
[AITER](https://github.com/ROCm/aiter) is a fundamental dependency. Wheel-izing it is ongoing.
|
||||||
Until we can pin it reliably, install it manually (typically following the [ROCm docker recipe](https://github.com/sgl-project/sglang/blob/main/docker/rocm.Dockerfile#L106).
|
Until we can pin it reliably, install it manually (typically following the [ROCm docker recipe](https://github.com/sgl-project/sglang/blob/main/docker/rocm.Dockerfile#L106).
|
||||||
|
|
||||||
### Revolving triton
|
### Resolving triton
|
||||||
|
|
||||||
To avoid known issues in triton 3.5.1 installed by default, we recommend upgrading triton after installation. In ROCm 7.0.0 environment,
|
To avoid known issues in triton 3.5.1 installed by default, we recommend upgrading triton after installation in a ROCm 7.2.0 environment:
|
||||||
```
|
|
||||||
pip install triton==3.6.0
|
|
||||||
```
|
|
||||||
or ROCm 7.2.0,
|
|
||||||
```
|
```
|
||||||
pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp310-cp310-linux_x86_64.whl
|
pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp310-cp310-linux_x86_64.whl
|
||||||
```
|
```
|
||||||
|
|||||||
+3
-7
@@ -3,9 +3,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
ROCM_VERSION=${1:-}
|
ROCM_VERSION=${1:-}
|
||||||
|
|
||||||
if [[ "${ROCM_VERSION}" == "700" ]]; then
|
if [[ "${ROCM_VERSION}" == "720" ]]; then
|
||||||
IMAGE="lmsysorg/sglang:v0.5.8.post1-rocm700-mi35x"
|
|
||||||
elif [[ "${ROCM_VERSION}" == "720" ]]; then
|
|
||||||
IMAGE="rocm/pytorch:rocm7.2_ubuntu22.04_py3.10_pytorch_release_2.9.1"
|
IMAGE="rocm/pytorch:rocm7.2_ubuntu22.04_py3.10_pytorch_release_2.9.1"
|
||||||
elif [[ "${ROCM_VERSION}" == "1000" ]]; then
|
elif [[ "${ROCM_VERSION}" == "1000" ]]; then
|
||||||
# Ubuntu 24.04 / Python 3.12 / torch 2.11 matches the stack the released
|
# Ubuntu 24.04 / Python 3.12 / torch 2.11 matches the stack the released
|
||||||
@@ -13,7 +11,7 @@ elif [[ "${ROCM_VERSION}" == "1000" ]]; then
|
|||||||
# wheel can still cover both gfx942 and gfx950.
|
# wheel can still cover both gfx942 and gfx950.
|
||||||
IMAGE="rocm/pytorch:rocm10.0_ubuntu24.04_py3.12_pytorch_release_2.11.0"
|
IMAGE="rocm/pytorch:rocm10.0_ubuntu24.04_py3.12_pytorch_release_2.11.0"
|
||||||
else
|
else
|
||||||
echo "ERROR: Unsupported ROCM_VERSION='${ROCM_VERSION}'. Only '700', '720' and '1000' are supported." >&2
|
echo "ERROR: Unsupported ROCM_VERSION='${ROCM_VERSION}'. Only '720' and '1000' are supported." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -69,9 +67,7 @@ docker run --rm \
|
|||||||
${IMAGE} \
|
${IMAGE} \
|
||||||
bash -c "
|
bash -c "
|
||||||
# Install torch, triton, and friends, depending on the ROCm version
|
# Install torch, triton, and friends, depending on the ROCm version
|
||||||
if [[ "${ROCM_VERSION}" == "700" ]]; then
|
if [[ "${ROCM_VERSION}" == "720" ]]; then
|
||||||
${PYTHON_ROOT_PATH}/pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torch-2.9.1.dev20251204%2Brocm7.0.2.lw.git351ff442-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/triton-3.5.1%2Brocm7.0.2.gita272dfa8-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchaudio-2.9.0%2Brocm7.0.2.gite3c6ee2b-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchvision-0.24.0%2Brocm7.0.2.gitb919bd0c-cp310-cp310-linux_x86_64.whl
|
|
||||||
elif [[ "${ROCM_VERSION}" == "720" ]]; then
|
|
||||||
${PYTHON_ROOT_PATH}/pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchaudio-2.9.0%2Brocm7.2.0.gite3c6ee2b-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp310-cp310-linux_x86_64.whl
|
${PYTHON_ROOT_PATH}/pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchaudio-2.9.0%2Brocm7.2.0.gite3c6ee2b-cp310-cp310-linux_x86_64.whl https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp310-cp310-linux_x86_64.whl
|
||||||
fi
|
fi
|
||||||
${ROCM_SETUP}
|
${ROCM_SETUP}
|
||||||
|
|||||||
+1
-14
@@ -67,18 +67,6 @@ runtime_common = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# ROCm specific packages (https://repo.radeon.com/rocm/manylinux/)
|
# ROCm specific packages (https://repo.radeon.com/rocm/manylinux/)
|
||||||
# Existing practice for daily rocm700 docker images relies on 700-rc
|
|
||||||
# versions of software that are not public available. Here we pin some
|
|
||||||
# from rocm702 as the closest set as daily rocm700 images.
|
|
||||||
rocm700 = [
|
|
||||||
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torch-2.9.1.dev20251204%2Brocm7.0.2.lw.git351ff442-cp310-cp310-linux_x86_64.whl",
|
|
||||||
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/triton-3.5.1%2Brocm7.0.2.gita272dfa8-cp310-cp310-linux_x86_64.whl",
|
|
||||||
"torchaudio @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchaudio-2.9.0%2Brocm7.0.2.gite3c6ee2b-cp310-cp310-linux_x86_64.whl",
|
|
||||||
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchvision-0.24.0%2Brocm7.0.2.gitb919bd0c-cp310-cp310-linux_x86_64.whl",
|
|
||||||
"mooncake-transfer-engine-non-cuda==0.3.8.post1",
|
|
||||||
"sglang-kernel @ https://github.com/sgl-project/whl/releases/download/v0.4.0/sglang_kernel-0.4.0+rocm700-cp310-abi3-manylinux2014_x86_64.whl",
|
|
||||||
]
|
|
||||||
|
|
||||||
rocm720 = [
|
rocm720 = [
|
||||||
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp310-cp310-linux_x86_64.whl",
|
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp310-cp310-linux_x86_64.whl",
|
||||||
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp310-cp310-linux_x86_64.whl",
|
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp310-cp310-linux_x86_64.whl",
|
||||||
@@ -89,8 +77,7 @@ rocm720 = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# HIP (Heterogeneous-computing Interface for Portability) for AMD
|
# HIP (Heterogeneous-computing Interface for Portability) for AMD
|
||||||
# Install with one of:
|
# Install with:
|
||||||
# pip install "amd-sglang[srt_hip,rocm700]"
|
|
||||||
# pip install "amd-sglang[srt_hip,rocm720]"
|
# pip install "amd-sglang[srt_hip,rocm720]"
|
||||||
srt_hip = [
|
srt_hip = [
|
||||||
"amd-sglang[runtime_common]",
|
"amd-sglang[runtime_common]",
|
||||||
|
|||||||
Reference in New Issue
Block a user