File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -360,14 +360,14 @@ for pkg in /$WHEELHOUSE_DIR/torch*linux*.whl /$LIBTORCH_HOUSE_DIR/libtorch*.zip;
360
360
# set RPATH of _C.so and similar to $ORIGIN, $ORIGIN/lib
361
361
find $PREFIX -maxdepth 1 -type f -name " *.so*" | while read sofile; do
362
362
echo " Setting rpath of $sofile to ${C_SO_RPATH:- ' $ORIGIN:$ORIGIN/lib' } "
363
- $PATCHELF_BIN --set-rpath ${C_SO_RPATH:- ' $ORIGIN:$ORIGIN/lib' } $sofile
363
+ $PATCHELF_BIN --set-rpath ${C_SO_RPATH:- ' $ORIGIN:$ORIGIN/lib' } ${FORCE_RPATH :- } $ sofile
364
364
$PATCHELF_BIN --print-rpath $sofile
365
365
done
366
366
367
367
# set RPATH of lib/ files to $ORIGIN
368
368
find $PREFIX /lib -maxdepth 1 -type f -name " *.so*" | while read sofile; do
369
369
echo " Setting rpath of $sofile to ${LIB_SO_RPATH:- ' $ORIGIN' } "
370
- $PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:- ' $ORIGIN' } $sofile
370
+ $PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:- ' $ORIGIN' } ${FORCE_RPATH :- } $ sofile
371
371
$PATCHELF_BIN --print-rpath $sofile
372
372
done
373
373
Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ elif [[ $CUDA_VERSION == "11.7" ]]; then
283
283
CUDA_RPATHS=$( IFS=: ; echo " ${CUDA_RPATHS[*]} " )
284
284
export C_SO_RPATH=$CUDA_RPATHS ' :$ORIGIN:$ORIGIN/lib'
285
285
export LIB_SO_RPATH=$CUDA_RPATHS ' :$ORIGIN'
286
+ export FORCE_RPATH=" --force-rpath"
286
287
fi
287
288
else
288
289
echo " Unknown cuda version $CUDA_VERSION "
You can’t perform that action at this time.
0 commit comments