Skip to content

Commit 3d302ee

Browse files
authored
[ROCm] add hipblaslt library files (#1695)
With pytorch/pytorch#114329 merged, we need to include hipblaslt library files within the ROCm wheel.
1 parent add4488 commit 3d302ee

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

manywheel/build_rocm.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ elif [[ "$OS_NAME" == *"Ubuntu"* ]]; then
133133
LIBDRM_AMDGPU_PATH="/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1"
134134
MAYBE_LIB64=lib
135135
fi
136-
OS_SO_PATHS=($LIBGOMP_PATH $LIBNUMA_PATH\
136+
OS_SO_PATHS=($LIBGOMP_PATH $LIBNUMA_PATH\
137137
$LIBELF_PATH $LIBTINFO_PATH\
138138
$LIBDRM_PATH $LIBDRM_AMDGPU_PATH)
139139
OS_SO_FILES=()
@@ -147,7 +147,7 @@ done
147147
if [[ $ROCM_INT -ge 50200 ]]; then
148148
ROCBLAS_LIB_SRC=$ROCM_HOME/lib/rocblas/library
149149
ROCBLAS_LIB_DST=lib/rocblas/library
150-
else
150+
else
151151
ROCBLAS_LIB_SRC=$ROCM_HOME/rocblas/lib/library
152152
ROCBLAS_LIB_DST=lib/library
153153
fi
@@ -156,17 +156,24 @@ ARCH_SPECIFIC_FILES=$(ls $ROCBLAS_LIB_SRC | grep -E $ARCH)
156156
OTHER_FILES=$(ls $ROCBLAS_LIB_SRC | grep -v gfx)
157157
ROCBLAS_LIB_FILES=($ARCH_SPECIFIC_FILES $OTHER_FILES)
158158

159+
# hipblaslt library files
160+
HIPBLASLT_LIB_SRC=$ROCM_HOME/lib/hipblaslt/library
161+
HIPBLASLT_LIB_DST=lib/hipblaslt/library
162+
ARCH_SPECIFIC_FILES=$(ls $HIPBLASLT_LIB_SRC | grep -E $ARCH)
163+
OTHER_FILES=$(ls $HIPBLASLT_LIB_SRC | grep -v gfx)
164+
HIPBLASLT_LIB_FILES=($ARCH_SPECIFIC_FILES $OTHER_FILES)
165+
159166
# ROCm library files
160167
ROCM_SO_PATHS=()
161168
for lib in "${ROCM_SO_FILES[@]}"
162169
do
163170
file_path=($(find $ROCM_HOME/lib/ -name "$lib")) # First search in lib
164-
if [[ -z $file_path ]]; then
171+
if [[ -z $file_path ]]; then
165172
if [ -d "$ROCM_HOME/lib64/" ]; then
166173
file_path=($(find $ROCM_HOME/lib64/ -name "$lib")) # Then search in lib64
167174
fi
168175
fi
169-
if [[ -z $file_path ]]; then
176+
if [[ -z $file_path ]]; then
170177
file_path=($(find $ROCM_HOME/ -name "$lib")) # Then search in ROCM_HOME
171178
fi
172179
if [[ -z $file_path ]]; then
@@ -188,11 +195,13 @@ DEPS_SONAME=(
188195

189196
DEPS_AUX_SRCLIST=(
190197
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_SRC/}"
198+
"${HIPBLASLT_LIB_FILES[@]/#/$HIPBLASLT_LIB_SRC/}"
191199
"/opt/amdgpu/share/libdrm/amdgpu.ids"
192200
)
193201

194202
DEPS_AUX_DSTLIST=(
195203
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_DST/}"
204+
"${HIPBLASLT_LIB_FILES[@]/#/$HIPBLASLT_LIB_DST/}"
196205
"share/libdrm/amdgpu.ids"
197206
)
198207

0 commit comments

Comments
 (0)