Skip to content

Commit

Permalink
Use | to OR different conditions and avoid repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
jithunnair-amd committed Jul 15, 2024
1 parent 2a4dc44 commit 674fbc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
5 changes: 1 addition & 4 deletions common/install_rocm_drm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ case "$ID" in
apt-get install -y libpciaccess-dev pkg-config
apt-get clean
;;
centos)
yum install -y libpciaccess-devel pkgconfig
;;
almalinux)
centos|almalinux)
yum install -y libpciaccess-devel pkgconfig
;;
*)
Expand Down
24 changes: 4 additions & 20 deletions manywheel/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ case ${GPU_ARCH_TYPE} in
MANY_LINUX_VERSION="aarch64"
DOCKERFILE_SUFFIX="_cuda_aarch64"
;;
rocm)
rocm|rocm-manylinux_2_28)
TARGET=rocm_final
DOCKER_TAG=rocm${GPU_ARCH_VERSION}
GPU_IMAGE=rocm/dev-centos-7:${GPU_ARCH_VERSION}-complete
Expand All @@ -92,25 +92,9 @@ case ${GPU_ARCH_TYPE} in
PYTORCH_ROCM_ARCH+=";gfx942"
fi
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
;;
rocm-manylinux_2_28)
TARGET=rocm_final
DOCKER_TAG=rocm${GPU_ARCH_VERSION}
GPU_IMAGE=amd64/almalinux:8
#PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908;gfx90a;gfx1030;gfx1100"
PYTORCH_ROCM_ARCH="gfx908;gfx90a"
ROCM_REGEX="([0-9]+)\.([0-9]+)[\.]?([0-9]*)"
if [[ $GPU_ARCH_VERSION =~ $ROCM_REGEX ]]; then
ROCM_VERSION_INT=$((${BASH_REMATCH[1]}*10000 + ${BASH_REMATCH[2]}*100 + ${BASH_REMATCH[3]:-0}))
else
echo "ERROR: rocm regex failed"
exit 1
fi
#if [[ $ROCM_VERSION_INT -ge 60000 ]]; then
# PYTORCH_ROCM_ARCH+=";gfx942"
#fi
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=11"
MANY_LINUX_VERSION="2_28"
if [ ${GPU_ARCH_TYPE} == "rocm-manylinux_2_28" ]; then
MANY_LINUX_VERSION="2_28"
fi
;;
xpu)
TARGET=xpu_final
Expand Down

0 comments on commit 674fbc7

Please sign in to comment.