Skip to content

[pull] master from pytorch:master #13

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

Merged
merged 4 commits into from
Jun 10, 2020
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
6 changes: 6 additions & 0 deletions check_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,10 @@ if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
build_example_cpp_with_incorrect_abi simple-torch-test
fi
else
pushd /tmp
python -c 'import torch'
python -c 'from caffe2.python import core'
popd
fi


Expand All @@ -325,7 +327,9 @@ if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
else
if [[ "$(uname)" != 'Darwin' || "$PACKAGE_TYPE" != *wheel ]]; then
echo "Checking that MKL is available"
pushd /tmp
python -c 'import torch; exit(0 if torch.backends.mkl.is_available() else 1)'
popd
fi
fi

Expand All @@ -347,6 +351,7 @@ if [[ "$DESIRED_CUDA" != 'cpu' ]]; then
if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
build_and_run_example_cpp check-torch-cuda
else
pushd /tmp
echo "Checking that CUDA archs are setup correctly"
timeout 20 python -c 'import torch; torch.randn([3,5]).cuda()'

Expand All @@ -357,5 +362,6 @@ if [[ "$DESIRED_CUDA" != 'cpu' ]]; then

echo "Checking that CuDNN is available"
python -c 'import torch; exit(0 if torch.backends.cudnn.is_available() else 1)'
popd
fi # if libtorch
fi # if cuda
8 changes: 6 additions & 2 deletions smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ py_dot="${DESIRED_PYTHON:0:3}"

# Generate "long" python versions cp27-cp27mu
py_long="cp${DESIRED_PYTHON:0:1}${DESIRED_PYTHON:2:1}-cp${DESIRED_PYTHON:0:1}${DESIRED_PYTHON:2}"
# TODO: I know this is the wrong way to do this translation, we should probably fix it upstream, but this is the quickest way
if [[ "${py_long}" = "cp38-cp38m" ]]; then
py_long="cp38-cp38"
fi

# Determine package name
if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
Expand All @@ -66,7 +70,7 @@ if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
else
LIBTORCH_ABI=
fi
if [[ "$DESIRED_CUDA" == 'cu101' || "$libtorch_variant" == 'macos' ]]; then
if [[ "$DESIRED_CUDA" == 'cu102' || "$libtorch_variant" == 'macos' ]]; then
package_name="libtorch-$LIBTORCH_ABI$libtorch_variant-${NIGHTLIES_DATE_PREAMBLE}${DATE}.zip"
else
package_name="libtorch-$LIBTORCH_ABI$libtorch_variant-${NIGHTLIES_DATE_PREAMBLE}${DATE}%2B${DESIRED_CUDA}.zip"
Expand All @@ -79,7 +83,7 @@ elif [[ "$DESIRED_CUDA" == 'cpu' && "$(uname)" != 'Darwin' ]]; then
else
package_name='pytorch'
fi
if [[ "$(uname)" == 'Darwin' ]] || [[ "$DESIRED_CUDA" == "cu101" ]] || [[ "$PACKAGE_TYPE" == 'conda' ]]; then
if [[ "$(uname)" == 'Darwin' ]] || [[ "$DESIRED_CUDA" == "cu102" ]] || [[ "$PACKAGE_TYPE" == 'conda' ]]; then
package_name_and_version="${package_name}==${NIGHTLIES_DATE_PREAMBLE}${DATE}"
else
# Linux binaries have the cuda version appended to them. This is only on
Expand Down