Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wheel build scripts for ROCm5.5 #1413

Merged
merged 3 commits into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions manywheel/build_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,13 @@ ROCM_SO_FILES=(
"libhipblas.so"
"libhipfft.so"
"libhiprand.so"
"libhipsolver.so"
"libhipsparse.so"
"libhsa-runtime64.so"
"libamd_comgr.so"
"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"
Expand All @@ -97,6 +94,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
Expand Down Expand Up @@ -164,6 +168,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 "Error: Library file $lib is not found." >&2
exit 1
fi
ROCM_SO_PATHS[${#ROCM_SO_PATHS[@]}]="$file_path" # Append lib to array
done

Expand All @@ -179,16 +187,19 @@ DEPS_SONAME=(

DEPS_AUX_SRCLIST=(
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_SRC/}"
"${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_SRC/}"
"/opt/amdgpu/share/libdrm/amdgpu.ids"
)

DEPS_AUX_DSTLIST=(
"${ROCBLAS_LIB_FILES[@]/#/$ROCBLAS_LIB_DST/}"
"${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_DST/}"
"share/libdrm/amdgpu.ids"
)

if [[ $ROCM_INT -ge 50500 ]]; then
DEPS_AUX_SRCLIST[${#DEPS_AUX_SRCLIST[@]}]="${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_SRC/}"
DEPS_AUX_DSTLIST[${#DEPS_AUX_DSTLIST[@]}]="${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_DST/}"
fi

echo "PYTORCH_ROCM_ARCH: ${PYTORCH_ROCM_ARCH}"

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