diff --git a/check_binary.sh b/check_binary.sh index a9d15698d..269a340b4 100755 --- a/check_binary.sh +++ b/check_binary.sh @@ -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 @@ -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 @@ -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()' @@ -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 diff --git a/smoke_test.sh b/smoke_test.sh index 24bc1a0c9..8e3414f7b 100755 --- a/smoke_test.sh +++ b/smoke_test.sh @@ -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 @@ -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" @@ -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