From 93993496791ddcae348be6962128c6433c4d0aed Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Wed, 18 Jan 2023 03:17:12 -0800 Subject: [PATCH 1/3] Use libtinfo.so.6 for Ubuntu 2004 --- manywheel/build_rocm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index b452a2a9e..4046d5f02 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -114,7 +114,7 @@ elif [[ "$OS_NAME" == *"Ubuntu"* ]]; then LIBGOMP_PATH="/usr/lib/x86_64-linux-gnu/libgomp.so.1" LIBNUMA_PATH="/usr/lib/x86_64-linux-gnu/libnuma.so.1" LIBELF_PATH="/usr/lib/x86_64-linux-gnu/libelf.so.1" - LIBTINFO_PATH="/lib/x86_64-linux-gnu/libtinfo.so.5" + LIBTINFO_PATH="/lib/x86_64-linux-gnu/libtinfo.so.6" LIBDRM_PATH="/usr/lib/x86_64-linux-gnu/libdrm.so.2" LIBDRM_AMDGPU_PATH="/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1" MAYBE_LIB64=lib From ccd9cb0ecf03ae8bc0c2d04ddcd7a1541fcbc5c0 Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Wed, 18 Jan 2023 06:45:36 -0800 Subject: [PATCH 2/3] Fix to origname grep --- manywheel/build_common.sh | 2 +- manywheel/build_libtorch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manywheel/build_common.sh b/manywheel/build_common.sh index 98c926454..cc56e695a 100644 --- a/manywheel/build_common.sh +++ b/manywheel/build_common.sh @@ -281,7 +281,7 @@ replace_needed_sofiles() { patchedname=$3 if [[ "$origname" != "$patchedname" ]] || [[ "$DESIRED_CUDA" == *"rocm"* ]]; then set +e - origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname*") + origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname.*") ERRCODE=$? set -e if [ "$ERRCODE" -eq "0" ]; then diff --git a/manywheel/build_libtorch.sh b/manywheel/build_libtorch.sh index c4dd9aedb..855d4bcc8 100644 --- a/manywheel/build_libtorch.sh +++ b/manywheel/build_libtorch.sh @@ -303,7 +303,7 @@ for pkg in /$LIBTORCH_HOUSE_DIR/libtorch*.zip; do patchedname=${patched[i]} if [[ "$origname" != "$patchedname" ]] || [[ "$DESIRED_CUDA" == *"rocm"* ]]; then set +e - origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname*") + origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname.*") ERRCODE=$? set -e if [ "$ERRCODE" -eq "0" ]; then From 83f4f60d245d4101663da12fd023505a69a65197 Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Thu, 19 Jan 2023 10:32:33 +0000 Subject: [PATCH 3/3] Condition on ROCM_VERSION for libtinfo6 --- manywheel/build_rocm.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index 4046d5f02..198237a99 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -114,7 +114,11 @@ elif [[ "$OS_NAME" == *"Ubuntu"* ]]; then LIBGOMP_PATH="/usr/lib/x86_64-linux-gnu/libgomp.so.1" LIBNUMA_PATH="/usr/lib/x86_64-linux-gnu/libnuma.so.1" LIBELF_PATH="/usr/lib/x86_64-linux-gnu/libelf.so.1" - LIBTINFO_PATH="/lib/x86_64-linux-gnu/libtinfo.so.6" + if [[ $ROCM_INT -ge 50300 ]]; then + LIBTINFO_PATH="/lib/x86_64-linux-gnu/libtinfo.so.6" + else + LIBTINFO_PATH="/lib/x86_64-linux-gnu/libtinfo.so.5" + fi LIBDRM_PATH="/usr/lib/x86_64-linux-gnu/libdrm.so.2" LIBDRM_AMDGPU_PATH="/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1" MAYBE_LIB64=lib