File tree Expand file tree Collapse file tree 2 files changed +14
-34
lines changed Expand file tree Collapse file tree 2 files changed +14
-34
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
12set -ex
23
34# Set ROCM_HOME isn't available, use ROCM_PATH if set or /opt/rocm
5051 cp $lib $TRITON_ROCM_DIR /lib/
5152done
5253
53- # Required ROCm libraries
54- if [[ " ${MAJOR_VERSION} " == " 6" ]]; then
55- libamdhip=" libamdhip64.so.6"
56- else
57- libamdhip=" libamdhip64.so.5"
58- fi
59-
6054# Required ROCm libraries - ROCm 6.0
6155ROCM_SO=(
62- " ${libamdhip} "
63- " libhsa-runtime64.so.1"
64- " libdrm.so.2"
65- " libdrm_amdgpu.so.1"
56+ " libamdhip64.so"
57+ " libhsa-runtime64.so"
58+ " libdrm.so"
59+ " libdrm_amdgpu.so"
60+ " libamd_comgr.so"
61+ " librocprofiler-register.so"
6662)
6763
68- if [[ $ROCM_INT -ge 60400 ]]; then
69- ROCM_SO+=(" libamd_comgr.so.3" )
70- else
71- ROCM_SO+=(" libamd_comgr.so.2" )
72- fi
73-
74- if [[ $ROCM_INT -ge 60100 ]]; then
75- ROCM_SO+=(" librocprofiler-register.so.0" )
76- fi
77-
7864for lib in " ${ROCM_SO[@]} "
7965do
8066 file_path=($( find $ROCM_HOME /lib/ -name " $lib " ) ) # First search in lib
9581 fi
9682
9783 cp $file_path $TRITON_ROCM_DIR /lib
98- # When running locally, and not building a wheel, we need to satisfy shared objects requests that don't look for versions
99- LINKNAME=$( echo $lib | sed -e ' s/\.so.*/.so/g' )
100- ln -sf $lib $TRITON_ROCM_DIR /lib/$LINKNAME
101-
10284done
10385
10486# Copy Include Files
Original file line number Diff line number Diff line change @@ -19,15 +19,13 @@ replace_needed_sofiles() {
1919 find $1 -name ' *.so*' -o -name ' ld.lld' | while read sofile; do
2020 origname=$2
2121 patchedname=$3
22- if [[ " $origname " != " $patchedname " ]]; then
23- set +e
24- origname=$( $PATCHELF_BIN --print-needed $sofile | grep " $origname .*" )
25- ERRCODE=$?
26- set -e
27- if [ " $ERRCODE " -eq " 0" ]; then
28- echo " patching $sofile entry $origname to $patchedname "
29- $PATCHELF_BIN --replace-needed $origname $patchedname $sofile
30- fi
22+ set +e
23+ origname=$( $PATCHELF_BIN --print-needed $sofile | grep " $origname .*" )
24+ ERRCODE=$?
25+ set -e
26+ if [ " $ERRCODE " -eq " 0" ]; then
27+ echo " patching $sofile entry $origname to $patchedname "
28+ $PATCHELF_BIN --replace-needed $origname $patchedname $sofile
3129 fi
3230 done
3331}
You can’t perform that action at this time.
0 commit comments