[AMD] Add ROCm 10 (gfx942 / gfx950) release images (#36434)
This commit is contained in:
@@ -50,11 +50,12 @@ fi
|
||||
IMAGE_TORCH_VERSION=$(docker exec ci_sglang python3 -c 'import torch; print(torch.__version__)')
|
||||
IMAGE_HIP_VERSION=$(docker exec ci_sglang python3 -c 'import torch; print(torch.version.hip or "")')
|
||||
IMAGE_GPU_ARCH=$(docker exec ci_sglang printenv GPU_ARCH 2>/dev/null || true)
|
||||
if [[ "${IMAGE_GPU_ARCH}" =~ ^(gfx942|gfx950)(-rocm720|-rocm724)?$ ]]; then
|
||||
if [[ "${IMAGE_GPU_ARCH}" =~ ^(gfx942|gfx950)(-rocm720|-rocm724|-rocm1000)?$ ]]; then
|
||||
echo "[CI-IMAGE] Image GPU_ARCH=${IMAGE_GPU_ARCH}"
|
||||
case "${IMAGE_GPU_ARCH}" in
|
||||
*-rocm724) IMAGE_BASE_ARG_SUFFIX="_ROCM724"; IMAGE_STAGE_SUFFIX="-rocm724" ;;
|
||||
*-rocm720) IMAGE_BASE_ARG_SUFFIX="_ROCM720"; IMAGE_STAGE_SUFFIX="-rocm720" ;;
|
||||
*-rocm1000) IMAGE_BASE_ARG_SUFFIX="_ROCM1000"; IMAGE_STAGE_SUFFIX="-rocm1000" ;;
|
||||
*) IMAGE_BASE_ARG_SUFFIX=""; IMAGE_STAGE_SUFFIX="" ;;
|
||||
esac
|
||||
IMAGE_GFX="${IMAGE_GPU_ARCH%-*}"
|
||||
@@ -82,9 +83,9 @@ fi
|
||||
unset IMAGE_GPU_ARCH
|
||||
|
||||
# Install the required dependencies in CI.
|
||||
# ROCm 7.2.4 images ship torch 2.11, which srt_hip cannot satisfy (it pins
|
||||
# compressed-tensors 0.15.0, requiring torch<2.11). Select the rocm724 extras.
|
||||
if [[ "${IMAGE_STAGE_SUFFIX}" == "-rocm724" ]]; then
|
||||
# Select the dependency extra that matches each image's torch stack. Plain
|
||||
# srt_hip pins compressed-tensors below the version required by torch 2.11.
|
||||
if [[ "${IMAGE_STAGE_SUFFIX}" == "-rocm724" || "${IMAGE_STAGE_SUFFIX}" == "-rocm1000" ]]; then
|
||||
EXTRAS="${EXTRAS/dev_hip/dev_hip_rocm724}"
|
||||
fi
|
||||
echo "Image torch ${IMAGE_TORCH_VERSION}, HIP ${IMAGE_HIP_VERSION}; installing python extras: [${EXTRAS}]"
|
||||
@@ -265,9 +266,10 @@ if docker exec ci_sglang test -d /sgl-workspace/mori; then
|
||||
fi
|
||||
|
||||
echo "[MORI] Reinstalling MORI ${MORI_COMMIT} (MORI_GPU_ARCHS=${MORI_GPU_ARCHS})"
|
||||
# Only the rocm724 (noble) base is missing libgrpc++-dev; 7.0 and 7.2.0 built
|
||||
# MORI without it for months before this step existed, so skip the apt round
|
||||
# trip there. Where it does run, neither step may be fatal: apt-get update
|
||||
# Only the rocm724 and rocm1000 (noble) bases attempt to install
|
||||
# libgrpc++-dev; 7.0 and 7.2.0 built MORI without it for months before this
|
||||
# step existed, so skip the apt round trip there. Where it does run, neither
|
||||
# step may be fatal: apt-get update
|
||||
# exits 100 for a single unreachable index while still keeping every index it
|
||||
# did fetch, which under set -e is enough to take out the dependency install
|
||||
# on every AMD runner at once. Six external apt hosts are in play, so the
|
||||
@@ -282,10 +284,20 @@ if docker exec ci_sglang test -d /sgl-workspace/mori; then
|
||||
cd /sgl-workspace/mori
|
||||
git checkout '${MORI_COMMIT}'
|
||||
git submodule update --init --recursive
|
||||
if [ '${IMAGE_STAGE_SUFFIX}' = '-rocm724' ]; then
|
||||
if [ '${IMAGE_STAGE_SUFFIX}' = '-rocm724' ] || [ '${IMAGE_STAGE_SUFFIX}' = '-rocm1000' ]; then
|
||||
apt-get update || echo '[MORI] apt-get update reported errors; continuing with the indexes it did fetch'
|
||||
apt-get install -y --no-install-recommends libgrpc++-dev || echo '[MORI] libgrpc++-dev unavailable; building MORI without it'
|
||||
fi
|
||||
# The pip ROCm SDK vendors NUMA and libdrm under rocm_sysdeps, outside the
|
||||
# default compiler, CMake, and linker search paths used by MORI.
|
||||
ROCM_SYSDEPS="\${ROCM_HOME:-/opt/rocm}/lib/rocm_sysdeps"
|
||||
if [ '${IMAGE_STAGE_SUFFIX}' = '-rocm1000' ] && [ -d "\${ROCM_SYSDEPS}" ]; then
|
||||
export CMAKE_PREFIX_PATH="\${ROCM_SYSDEPS}\${CMAKE_PREFIX_PATH:+:\${CMAKE_PREFIX_PATH}}"
|
||||
export CPATH="\${ROCM_SYSDEPS}/include\${CPATH:+:\${CPATH}}"
|
||||
export LIBRARY_PATH="\${ROCM_SYSDEPS}/lib\${LIBRARY_PATH:+:\${LIBRARY_PATH}}"
|
||||
echo "\${ROCM_SYSDEPS}/lib" > /etc/ld.so.conf.d/rocm-sysdeps.conf
|
||||
ldconfig
|
||||
fi
|
||||
python3 setup.py develop
|
||||
python3 -c 'import os, torch; print(os.path.join(os.path.dirname(torch.__file__), \"lib\"))' > /etc/ld.so.conf.d/torch.conf
|
||||
ldconfig
|
||||
@@ -398,7 +410,7 @@ if [[ "${NEED_REBUILD}" == "true" ]]; then
|
||||
"
|
||||
|
||||
# Re-apply the Dockerfile torch.Stream patch after re-clone (ROCm/aiter#4817).
|
||||
if [[ "${IMAGE_STAGE_SUFFIX}" == "-rocm724" ]]; then
|
||||
if [[ "${IMAGE_STAGE_SUFFIX}" == "-rocm724" || "${IMAGE_STAGE_SUFFIX}" == "-rocm1000" ]]; then
|
||||
docker exec -i ci_sglang python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
p = Path("/sgl-workspace/aiter/csrc/cpp_itfs/torch_utils.py")
|
||||
|
||||
Reference in New Issue
Block a user