From 0d18a12b3dfeef8453973bf38d43b559c3b3e9e8 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Thu, 6 Jul 2023 16:55:11 -0700 Subject: [PATCH] Do not build PyTorch with LLVM (#1445) As NNC is dead, and llvm dependency has not been updated in last 4 years First step towards fixing https://github.com/pytorch/pytorch/issues/103756 --- conda/Dockerfile | 3 --- libtorch/Dockerfile | 3 --- manywheel/Dockerfile | 2 -- manywheel/Dockerfile_2014 | 2 -- manywheel/Dockerfile_cxx11-abi | 2 -- manywheel/build_common.sh | 4 ---- manywheel/build_libtorch.sh | 4 ---- 7 files changed, 20 deletions(-) diff --git a/conda/Dockerfile b/conda/Dockerfile index 45cc9b3d7..fb5c3c93d 100644 --- a/conda/Dockerfile +++ b/conda/Dockerfile @@ -68,9 +68,6 @@ COPY --from=cuda11.8 /usr/local/cuda-11.8 /usr/local/cuda-11.8 COPY --from=cuda12.1 /usr/local/cuda-12.1 /usr/local/cuda-12.1 FROM ${BASE_TARGET} as final -# Install LLVM -COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm -COPY --from=pytorch/llvm:9.0.1 /opt/llvm_no_cxx11_abi /opt/llvm_no_cxx11_abi COPY --from=openssl /opt/openssl /opt/openssl COPY --from=patchelf /patchelf /usr/local/bin/patchelf COPY --from=conda /opt/conda /opt/conda diff --git a/libtorch/Dockerfile b/libtorch/Dockerfile index ad3f8aad3..ff5e1f710 100644 --- a/libtorch/Dockerfile +++ b/libtorch/Dockerfile @@ -72,9 +72,6 @@ RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh FROM ${BASE_TARGET} as final -# Install LLVM -COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm -COPY --from=pytorch/llvm:9.0.1 /opt/llvm_no_cxx11_abi /opt/llvm_no_cxx11_abi COPY --from=openssl /opt/openssl /opt/openssl # Install patchelf ADD ./common/install_patchelf.sh install_patchelf.sh diff --git a/manywheel/Dockerfile b/manywheel/Dockerfile index f29b1329a..d3e9ad2ef 100644 --- a/manywheel/Dockerfile +++ b/manywheel/Dockerfile @@ -114,8 +114,6 @@ RUN git config --global --add safe.directory "*" ENV SSL_CERT_FILE=/opt/_internal/certs.pem # Install LLVM version -COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm -COPY --from=pytorch/llvm:9.0.1 /opt/llvm_no_cxx11_abi /opt/llvm_no_cxx11_abi COPY --from=openssl /opt/openssl /opt/openssl COPY --from=python /opt/python /opt/python COPY --from=python /opt/_internal /opt/_internal diff --git a/manywheel/Dockerfile_2014 b/manywheel/Dockerfile_2014 index 177397c70..2f9a7528e 100644 --- a/manywheel/Dockerfile_2014 +++ b/manywheel/Dockerfile_2014 @@ -97,8 +97,6 @@ RUN git config --global --add safe.directory "*" ENV SSL_CERT_FILE=/opt/_internal/certs.pem # Install LLVM version -COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm -COPY --from=pytorch/llvm:9.0.1 /opt/llvm_no_cxx11_abi /opt/llvm_no_cxx11_abi COPY --from=openssl /opt/openssl /opt/openssl COPY --from=base /opt/python /opt/python COPY --from=base /opt/_internal /opt/_internal diff --git a/manywheel/Dockerfile_cxx11-abi b/manywheel/Dockerfile_cxx11-abi index a5b0673e9..facaa5494 100644 --- a/manywheel/Dockerfile_cxx11-abi +++ b/manywheel/Dockerfile_cxx11-abi @@ -48,8 +48,6 @@ ADD ./common/install_libpng.sh install_libpng.sh RUN bash ./install_libpng.sh && rm install_libpng.sh FROM base as final -COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm -COPY --from=pytorch/llvm:9.0.1 /opt/llvm_no_cxx11_abi /opt/llvm_no_cxx11_abi COPY --from=openssl /opt/openssl /opt/openssl COPY --from=python /opt/python /opt/python COPY --from=python /opt/_internal /opt/_internal diff --git a/manywheel/build_common.sh b/manywheel/build_common.sh index cc56e695a..f4794b719 100644 --- a/manywheel/build_common.sh +++ b/manywheel/build_common.sh @@ -139,12 +139,8 @@ esac if [[ "$DESIRED_DEVTOOLSET" == *"cxx11-abi"* ]]; then export _GLIBCXX_USE_CXX11_ABI=1 - export USE_LLVM="/opt/llvm" - export LLVM_DIR="$USE_LLVM/lib/cmake/llvm" else export _GLIBCXX_USE_CXX11_ABI=0 - export USE_LLVM="/opt/llvm_no_cxx11_abi" - export LLVM_DIR="$USE_LLVM/lib/cmake/llvm" fi if [[ "$DESIRED_CUDA" == *"rocm"* ]]; then diff --git a/manywheel/build_libtorch.sh b/manywheel/build_libtorch.sh index 32e0f7a1a..43a3334db 100644 --- a/manywheel/build_libtorch.sh +++ b/manywheel/build_libtorch.sh @@ -103,12 +103,8 @@ fi if [[ "$DESIRED_DEVTOOLSET" == *"cxx11-abi"* ]]; then export _GLIBCXX_USE_CXX11_ABI=1 - export USE_LLVM="/opt/llvm" - export LLVM_DIR="$USE_LLVM/lib/cmake/llvm" else export _GLIBCXX_USE_CXX11_ABI=0 - export USE_LLVM="/opt/llvm_no_cxx11_abi" - export LLVM_DIR="$USE_LLVM/lib/cmake/llvm" fi if [[ "$DESIRED_CUDA" == *"rocm"* ]]; then