Skip to content

Commit

Permalink
Revert "Fix libtorch static builds that regressed (#1056)"
Browse files Browse the repository at this point in the history
This reverts commit 17bfd84.
  • Loading branch information
malfet authored Jun 16, 2022
1 parent b6a71d9 commit 2eac9c1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions manywheel/build_libtorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,8 @@ fi

echo "Calling setup.py install at $(date)"

BUILD_SHARED_VAR="ON"
USE_TENSORPIPE_VAR="ON"
if [[ $LIBTORCH_VARIANT = *"static"* ]]; then
STATIC_CMAKE_FLAG="-DTORCH_STATIC=1"
BUILD_SHARED_VAR="OFF"
# Tensorpipe breaks with static builds.
# Remove this after https://github.com/pytorch/tensorpipe/issues/449 is fixed
USE_TENSORPIPE_VAR="OFF"
fi

(
Expand All @@ -141,9 +135,7 @@ fi
EXTRA_CAFFE2_CMAKE_FLAGS="${EXTRA_CAFFE2_CMAKE_FLAGS[@]} $STATIC_CMAKE_FLAG" \
# TODO: Remove this flag once https://github.com/pytorch/pytorch/issues/55952 is closed
CFLAGS='-Wno-deprecated-declarations' \
BUILD_SHARED_LIBS=${BUILD_SHARED_VAR} \
USE_TENSORPIPE=${USE_TENSORPIPE_VAR} \
BUILD_LIBTORCH_CPU_WITH_DEBUG=1 \
BUILD_LIBTORCH_CPU_WITH_DEBUG=1 \
python setup.py install

mkdir -p libtorch/{lib,bin,include,share}
Expand Down

0 comments on commit 2eac9c1

Please sign in to comment.