|
2 | 2 |
|
3 | 3 | set -ex
|
4 | 4 |
|
5 |
| -export PYTORCH_BUILD_VERSION=0.4.1 |
6 |
| -export PYTORCH_BUILD_NUMBER=2 |
| 5 | +if [[ -z "$PYTORCH_BUILD_VERSION" ]]; then |
| 6 | + export PYTORCH_BUILD_VERSION=0.4.1 |
| 7 | +fi |
| 8 | +if [[ -z "$PYTORCH_BUILD_NUMBER" ]]; then |
| 9 | + export PYTORCH_BUILD_NUMBER=2 |
| 10 | +fi |
7 | 11 | export CMAKE_LIBRARY_PATH="/opt/intel/lib:/lib:$CMAKE_LIBRARY_PATH"
|
8 | 12 | export CMAKE_INCLUDE_PATH="/opt/intel:$CMAKE_INCLUDE_PATH"
|
9 | 13 | export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
|
@@ -59,6 +63,7 @@ for (( i=0; i<"${#DESIRED_PYTHON[@]}"; i++ )); do
|
59 | 63 | done
|
60 | 64 | echo "Will build for all Pythons: ${DESIRED_PYTHON[@]}"
|
61 | 65 |
|
| 66 | + |
62 | 67 | # ########################################################
|
63 | 68 | # # Compile wheels
|
64 | 69 | # #######################################################
|
@@ -281,12 +286,26 @@ cp /$WHEELHOUSE_DIR/torch*.whl /remote/$WHEELHOUSE_DIR/
|
281 | 286 | rm -rf /usr/local/cuda*
|
282 | 287 | rm -rf /opt/rh
|
283 | 288 |
|
| 289 | +# The package's name that we made could be torch-nightly |
| 290 | +if [[ -n "$TORCH_PACKAGE_NAME" ]]; then |
| 291 | + package_name="$TORCH_PACKAGE_NAME" |
| 292 | +else |
| 293 | + package_name='torch' |
| 294 | +fi |
| 295 | +echo "Expecting the built wheels to be packages for '$package_name'" |
| 296 | + |
| 297 | + |
| 298 | +# Test that all the wheels work |
284 | 299 | export OMP_NUM_THREADS=4 # on NUMA machines this takes too long
|
285 | 300 | pushd $PYTORCH_DIR/test
|
286 | 301 | for PYDIR in "${DESIRED_PYTHON[@]}"; do
|
287 |
| - "${PYDIR}/bin/pip" uninstall -y torch |
288 |
| - "${PYDIR}/bin/pip" install torch --no-index -f /$WHEELHOUSE_DIR |
| 302 | + "${PYDIR}/bin/pip" uninstall -y "$package_name" |
| 303 | + "${PYDIR}/bin/pip" install "$package_name" --no-index -f /$WHEELHOUSE_DIR |
289 | 304 | LD_LIBRARY_PATH="/usr/local/nvidia/lib64" PYCMD=$PYDIR/bin/python $PYDIR/bin/python run_test.py --exclude distributed
|
| 305 | + |
| 306 | + # Distributed tests are not expected to work on shared GPU machines (as of |
| 307 | + # 8/06/2018) so the errors from test_distributed are ignored. Expected |
| 308 | + # errors include socket addresses already being used. |
290 | 309 | set +e
|
291 | 310 | LD_LIBRARY_PATH="/usr/local/nvidia/lib64" PYCMD=$PYDIR/bin/python $PYDIR/bin/python run_test.py -i distributed
|
292 | 311 | set -e
|
|
0 commit comments