Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix libtorch static builds that regressed" #1063

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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