Skip to content

Commit

Permalink
Remove DESIRED_CUDA logic from check_binary.sh
Browse files Browse the repository at this point in the history
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
  • Loading branch information
malfet committed Jul 8, 2023
1 parent d07d66c commit 262847c
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions check_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
###############################################################################
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 262847c

Please sign in to comment.