Skip to content

Commit 1a3174e

Browse files
Update wheel build scripts for ROCm5.5 (#1413)
* Fix lib search logic and lib list * Add libhipsolver.so dependency for upstream Pytorch (needed since PyTorch PR 97370) * Add MIOpen db files to share path only for ROCm5.5 and above
1 parent 3f9562d commit 1a3174e

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

manywheel/build_rocm.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,13 @@ ROCM_SO_FILES=(
7878
"libhipblas.so"
7979
"libhipfft.so"
8080
"libhiprand.so"
81+
"libhipsolver.so"
8182
"libhipsparse.so"
8283
"libhsa-runtime64.so"
8384
"libamd_comgr.so"
8485
"libmagma.so"
8586
"librccl.so"
8687
"librocblas.so"
87-
"librocfft-device-0.so"
88-
"librocfft-device-1.so"
89-
"librocfft-device-2.so"
90-
"librocfft-device-3.so"
9188
"librocfft.so"
9289
"librocm_smi64.so"
9390
"librocrand.so"
@@ -97,6 +94,13 @@ ROCM_SO_FILES=(
9794
"libroctx64.so"
9895
)
9996

97+
if [[ $ROCM_INT -lt 50500 ]]; then
98+
ROCM_SO_FILES+=("librocfft-device-0.so")
99+
ROCM_SO_FILES+=("librocfft-device-1.so")
100+
ROCM_SO_FILES+=("librocfft-device-2.so")
101+
ROCM_SO_FILES+=("librocfft-device-3.so")
102+
fi
103+
100104
if [[ $ROCM_INT -ge 50400 ]]; then
101105
ROCM_SO_FILES+=("libhiprtc.so")
102106
fi
@@ -164,6 +168,10 @@ do
164168
if [[ -z $file_path ]]; then
165169
file_path=($(find $ROCM_HOME/ -name "$lib")) # Then search in ROCM_HOME
166170
fi
171+
if [[ -z $file_path ]]; then
172+
echo "Error: Library file $lib is not found." >&2
173+
exit 1
174+
fi
167175
ROCM_SO_PATHS[${#ROCM_SO_PATHS[@]}]="$file_path" # Append lib to array
168176
done
169177

@@ -179,16 +187,19 @@ DEPS_SONAME=(
179187

180188
DEPS_AUX_SRCLIST=(
181189
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_SRC/}"
182-
"${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_SRC/}"
183190
"/opt/amdgpu/share/libdrm/amdgpu.ids"
184191
)
185192

186193
DEPS_AUX_DSTLIST=(
187194
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_DST/}"
188-
"${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_DST/}"
189195
"share/libdrm/amdgpu.ids"
190196
)
191197

198+
if [[ $ROCM_INT -ge 50500 ]]; then
199+
DEPS_AUX_SRCLIST[${#DEPS_AUX_SRCLIST[@]}]="${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_SRC/}"
200+
DEPS_AUX_DSTLIST[${#DEPS_AUX_DSTLIST[@]}]="${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_DST/}"
201+
fi
202+
192203
echo "PYTORCH_ROCM_ARCH: ${PYTORCH_ROCM_ARCH}"
193204

194205
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

0 commit comments

Comments
 (0)