Skip to content

Commit 262847c

Browse files
committed
Remove DESIRED_CUDA logic from check_binary.sh
As [`pytorch/manylinux-builder`](https://hub.docker.com/r/pytorch/manylinux-builder) containers has only one version of CUDA, there is no need to select any Nor setup `LD_LIBRARY_PATH` as it does not match the setup users might have on their system (but keep it for libtorch tests for now) Should fix crash due to different minor version of cudnn installed in docker container and specified as dependency to a small wheel package, seen here https://github.com/pytorch/pytorch/actions/runs/5478547018/jobs/9980463690
1 parent d07d66c commit 262847c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

check_binary.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,6 @@ else
5151
install_root="$(dirname $(which python))/../lib/python${py_dot}/site-packages/torch/"
5252
fi
5353

54-
if [[ "$DESIRED_CUDA" != 'cpu' && "$DESIRED_CUDA" != 'cpu-cxx11-abi' && "$DESIRED_CUDA" != *"rocm"* ]]; then
55-
# cu90, cu92, cu100, cu101
56-
if [[ ${#DESIRED_CUDA} -eq 4 ]]; then
57-
CUDA_VERSION="${DESIRED_CUDA:2:1}.${DESIRED_CUDA:3:1}"
58-
elif [[ ${#DESIRED_CUDA} -eq 5 ]]; then
59-
CUDA_VERSION="${DESIRED_CUDA:2:2}.${DESIRED_CUDA:4:1}"
60-
fi
61-
echo "Using CUDA $CUDA_VERSION as determined by DESIRED_CUDA"
62-
63-
# Switch `/usr/local/cuda` to the desired CUDA version
64-
rm -rf /usr/local/cuda || true
65-
ln -s "/usr/local/cuda-${CUDA_VERSION}" /usr/local/cuda
66-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
67-
fi
68-
6954
###############################################################################
7055
# Check GCC ABI
7156
###############################################################################
@@ -311,6 +296,10 @@ build_example_cpp_with_incorrect_abi () {
311296
# Check simple Python/C++ calls
312297
###############################################################################
313298
if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
299+
# NS: Set LD_LIBRARY_PATH for CUDA builds, but perhaps it should be removed
300+
if [[ "$DESIRED_CUDA" == "cu"* ]]; then
301+
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
302+
fi
314303
build_and_run_example_cpp simple-torch-test
315304
# `_GLIBCXX_USE_CXX11_ABI` is always ignored by gcc in devtoolset7, so we test
316305
# the expected failure case for Ubuntu 16.04 + gcc 5.4 only.

0 commit comments

Comments
 (0)