From 262847c37b7e01d0eae2fb3763d4c3d9a395227c Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Thu, 6 Jul 2023 18:40:42 -0700 Subject: [PATCH] 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 --- check_binary.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/check_binary.sh b/check_binary.sh index 8c4779599..30b44b535 100755 --- a/check_binary.sh +++ b/check_binary.sh @@ -51,21 +51,6 @@ else install_root="$(dirname $(which python))/../lib/python${py_dot}/site-packages/torch/" fi -if [[ "$DESIRED_CUDA" != 'cpu' && "$DESIRED_CUDA" != 'cpu-cxx11-abi' && "$DESIRED_CUDA" != *"rocm"* ]]; then - # cu90, cu92, cu100, cu101 - if [[ ${#DESIRED_CUDA} -eq 4 ]]; then - CUDA_VERSION="${DESIRED_CUDA:2:1}.${DESIRED_CUDA:3:1}" - elif [[ ${#DESIRED_CUDA} -eq 5 ]]; then - CUDA_VERSION="${DESIRED_CUDA:2:2}.${DESIRED_CUDA:4:1}" - fi - echo "Using CUDA $CUDA_VERSION as determined by DESIRED_CUDA" - - # Switch `/usr/local/cuda` to the desired CUDA version - rm -rf /usr/local/cuda || true - ln -s "/usr/local/cuda-${CUDA_VERSION}" /usr/local/cuda - export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH -fi - ############################################################################### # Check GCC ABI ############################################################################### @@ -311,6 +296,10 @@ build_example_cpp_with_incorrect_abi () { # Check simple Python/C++ calls ############################################################################### if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then + # NS: Set LD_LIBRARY_PATH for CUDA builds, but perhaps it should be removed + if [[ "$DESIRED_CUDA" == "cu"* ]]; then + export LD_LIBRARY_PATH=/usr/local/cuda/lib64 + fi build_and_run_example_cpp simple-torch-test # `_GLIBCXX_USE_CXX11_ABI` is always ignored by gcc in devtoolset7, so we test # the expected failure case for Ubuntu 16.04 + gcc 5.4 only.