Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
27 changes: 23 additions & 4 deletions manywheel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -ex

export PYTORCH_BUILD_VERSION=0.4.1
export PYTORCH_BUILD_NUMBER=2
if [[ -z "$PYTORCH_BUILD_VERSION" ]]; then
export PYTORCH_BUILD_VERSION=0.4.1
fi
if [[ -z "$PYTORCH_BUILD_NUMBER" ]]; then
export PYTORCH_BUILD_NUMBER=2
fi
export CMAKE_LIBRARY_PATH="/opt/intel/lib:/lib:$CMAKE_LIBRARY_PATH"
export CMAKE_INCLUDE_PATH="/opt/intel:$CMAKE_INCLUDE_PATH"
export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
Expand Down Expand Up @@ -59,6 +63,7 @@ for (( i=0; i<"${#DESIRED_PYTHON[@]}"; i++ )); do
done
echo "Will build for all Pythons: ${DESIRED_PYTHON[@]}"


# ########################################################
# # Compile wheels
# #######################################################
Expand Down Expand Up @@ -281,12 +286,26 @@ cp /$WHEELHOUSE_DIR/torch*.whl /remote/$WHEELHOUSE_DIR/
rm -rf /usr/local/cuda*
rm -rf /opt/rh

# The package's name that we made could be torch-nightly
if [[ -n "$TORCH_PACKAGE_NAME" ]]; then
package_name="$TORCH_PACKAGE_NAME"
else
package_name='torch'
fi
echo "Expecting the built wheels to be packages for '$package_name'"


# Test that all the wheels work
export OMP_NUM_THREADS=4 # on NUMA machines this takes too long
pushd $PYTORCH_DIR/test
for PYDIR in "${DESIRED_PYTHON[@]}"; do
"${PYDIR}/bin/pip" uninstall -y torch
"${PYDIR}/bin/pip" install torch --no-index -f /$WHEELHOUSE_DIR
"${PYDIR}/bin/pip" uninstall -y "$package_name"
"${PYDIR}/bin/pip" install "$package_name" --no-index -f /$WHEELHOUSE_DIR
LD_LIBRARY_PATH="/usr/local/nvidia/lib64" PYCMD=$PYDIR/bin/python $PYDIR/bin/python run_test.py --exclude distributed

# Distributed tests are not expected to work on shared GPU machines (as of
# 8/06/2018) so the errors from test_distributed are ignored. Expected
# errors include socket addresses already being used.
set +e
LD_LIBRARY_PATH="/usr/local/nvidia/lib64" PYCMD=$PYDIR/bin/python $PYDIR/bin/python run_test.py -i distributed
set -e
Expand Down
22 changes: 18 additions & 4 deletions manywheel/build_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -ex

export PYTORCH_BUILD_VERSION=0.4.1
export PYTORCH_BUILD_NUMBER=2
if [[ -z "$PYTORCH_BUILD_VERSION" ]]; then
export PYTORCH_BUILD_VERSION=0.4.1
fi
if [[ -z "$PYTORCH_BUILD_NUMBER" ]]; then
export PYTORCH_BUILD_NUMBER=2
fi
export TH_BINARY_BUILD=1
export NO_CUDA=1
export CMAKE_LIBRARY_PATH="/opt/intel/lib:/lib:$CMAKE_LIBRARY_PATH"
Expand Down Expand Up @@ -208,10 +212,20 @@ cp /$WHEELHOUSE_DIR/torch*.whl /remote/$WHEELHOUSE_DIR/
# remove stuff before testing
rm -rf /opt/rh

# The package's name that we made could be torch-nightly
if [[ -n "$TORCH_PACKAGE_NAME" ]]; then
package_name="$TORCH_PACKAGE_NAME"
else
package_name='torch'
fi
echo "Expecting the built wheels to be packages for '$package_name'"


# Test that all the wheels work
export OMP_NUM_THREADS=4 # on NUMA machines this takes too long
pushd $PYTORCH_DIR/test
for PYDIR in "${DESIRED_PYTHON[@]}"; do
"${PYDIR}/bin/pip" uninstall -y torch
"${PYDIR}/bin/pip" install torch --no-index -f /$WHEELHOUSE_DIR
"${PYDIR}/bin/pip" uninstall -y "$package_name"

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

"${PYDIR}/bin/pip" install "$package_name" --no-index -f /$WHEELHOUSE_DIR
LD_LIBRARY_PATH="/usr/local/nvidia/lib64" PYCMD=$PYDIR/bin/python $PYDIR/bin/python run_test.py
done