[AMD] release rocm10 image for gfx1250 from amd_helios (#36892)

This commit is contained in:
YC Yen-Ching Tseng
2026-08-28 12:00:25 -07:00
committed by GitHub
parent f611e0c073
commit c7879af887
@@ -10,6 +10,7 @@ on:
options:
- 'all'
- publish
- publish-gfx1250
gpu_arch:
description: 'Select which ROCm 10 GPU arch to build'
required: false
@@ -116,3 +117,79 @@ jobs:
run: |
docker tag "rocm/sgl-dev:${IMAGE_TAG}" "lmsysorg/sglang-rocm:${IMAGE_TAG}"
docker push "lmsysorg/sglang-rocm:${IMAGE_TAG}"
# gfx1250 (MI45x) is still being brought up on the amd_helios branch: main
# has no gfx1250 stage in docker/rocm.Dockerfile, so this job builds from
# that branch rather than from the ref the workflow was triggered on. It runs
# on the same schedule as the pair above but stays a separate job, because
# there is no MI450 runner pool consuming the image and a bring-up build
# failure must not gate the released gfx942/gfx950 images.
publish-gfx1250:
if: github.repository == 'sgl-project/sglang' && (github.event_name != 'workflow_dispatch' || inputs.job_select == 'all' || inputs.job_select == 'publish-gfx1250')
runs-on: amd-docker-scale
environment: 'prod'
steps:
- name: Checkout amd_helios
uses: actions/checkout@v4
with:
ref: amd_helios
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set date
run: echo "DATE=$(date +%Y%m%d)" >> "$GITHUB_ENV"
- name: Get version and branch head
id: version
run: |
VERSION=$(python3 scripts/release/get_version_tag.py --tag-only | sed 's/^v//')
if [ -z "$VERSION" ]; then
echo "::error::Could not determine version from git tags"
exit 1
fi
# The checkout above is amd_helios, so this is the branch head that
# both the build context and the cloned sglang source come from.
BRANCH_SHA=$(git rev-parse HEAD)
COMMIT_HASH=$(git rev-parse --short HEAD)
PRETEND_VERSION="${VERSION}.dev${DATE}+g${COMMIT_HASH}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "branch_sha=${BRANCH_SHA}" >> "$GITHUB_OUTPUT"
echo "pretend_version=${PRETEND_VERSION}" >> "$GITHUB_OUTPUT"
echo "Building gfx1250 from amd_helios at ${BRANCH_SHA}"
- name: Login to Docker Hub (AMD)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_AMD_USERNAME }}
password: ${{ secrets.DOCKERHUB_AMD_TOKEN }}
- name: Build and push to rocm/sgl-dev
env:
BRANCH_SHA: ${{ steps.version.outputs.branch_sha }}
PRETEND_VERSION: ${{ steps.version.outputs.pretend_version }}
VERSION: ${{ steps.version.outputs.version }}
run: |
# `dev` marks this as built from a bring-up branch rather than from
# the ref the release ran on, so it never reads as a released tag.
image_tag="v${VERSION}-rocm10-mi45x-dev-${DATE}"
echo "Publishing rocm/sgl-dev:${image_tag}"
docker build . \
-f docker/rocm.Dockerfile \
--build-arg "SGL_BRANCH=${BRANCH_SHA}" \
--build-arg BUILD_TYPE=all \
--build-arg GPU_ARCH=gfx1250-rocm1000 \
--build-arg ENABLE_MORI=1 \
--build-arg ENABLE_NIXL=1 \
--build-arg "SETUPTOOLS_SCM_PRETEND_VERSION=${PRETEND_VERSION}" \
--build-arg UBUNTU_MIRROR=https://archive.ubuntu.com \
-t "rocm/sgl-dev:${image_tag}" \
--no-cache
docker push "rocm/sgl-dev:${image_tag}"