From 21cc230be6ac6728034b75236b3e45817449a0a0 Mon Sep 17 00:00:00 2001 From: Jithun Nair <37884920+jithunnair-amd@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:53:43 -0700 Subject: [PATCH] Conditionalise librocfft-device so's out of rocm5.5 (#22) Co-authored-by: Jack Taylor --- manywheel/build_rocm.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index b910e552f..701dc03af 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -84,10 +84,6 @@ ROCM_SO_FILES=( "libmagma.so" "librccl.so" "librocblas.so" - "librocfft-device-0.so" - "librocfft-device-1.so" - "librocfft-device-2.so" - "librocfft-device-3.so" "librocfft.so" "librocm_smi64.so" "librocrand.so" @@ -97,6 +93,13 @@ ROCM_SO_FILES=( "libroctx64.so" ) +if [[ $ROCM_INT -lt 50500 ]]; then + ROCM_SO_FILES+=("librocfft-device-0.so") + ROCM_SO_FILES+=("librocfft-device-1.so") + ROCM_SO_FILES+=("librocfft-device-2.so") + ROCM_SO_FILES+=("librocfft-device-3.so") +fi + if [[ $ROCM_INT -ge 50400 ]]; then ROCM_SO_FILES+=("libhiprtc.so") fi @@ -164,6 +167,10 @@ do if [[ -z $file_path ]]; then file_path=($(find $ROCM_HOME/ -name "$lib")) # Then search in ROCM_HOME fi + if [[ -z $file_path ]]; then + echo "Warning: Library file $lib is not found." + file_path="NOT_FOUND" + fi ROCM_SO_PATHS[${#ROCM_SO_PATHS[@]}]="$file_path" # Append lib to array done