File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -310,9 +310,7 @@ if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
310
310
build_example_cpp_with_incorrect_abi simple-torch-test
311
311
fi
312
312
else
313
- TMP_DIR=$( mktemp -d)
314
- trap ' rm -rf ${TMP_DIR}' EXIT
315
- pushd " ${TMP_DIR} " # To attempt to not muddle results with local python path
313
+ pushd /tmp
316
314
python -c ' import torch'
317
315
python -c ' from caffe2.python import core'
318
316
popd
@@ -329,7 +327,9 @@ if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
329
327
else
330
328
if [[ " $( uname) " != ' Darwin' || " $PACKAGE_TYPE " != * wheel ]]; then
331
329
echo " Checking that MKL is available"
330
+ pushd /tmp
332
331
python -c ' import torch; exit(0 if torch.backends.mkl.is_available() else 1)'
332
+ popd
333
333
fi
334
334
fi
335
335
@@ -351,6 +351,7 @@ if [[ "$DESIRED_CUDA" != 'cpu' ]]; then
351
351
if [[ " $PACKAGE_TYPE " == ' libtorch' ]]; then
352
352
build_and_run_example_cpp check-torch-cuda
353
353
else
354
+ pushd /tmp
354
355
echo " Checking that CUDA archs are setup correctly"
355
356
timeout 20 python -c ' import torch; torch.randn([3,5]).cuda()'
356
357
@@ -361,5 +362,6 @@ if [[ "$DESIRED_CUDA" != 'cpu' ]]; then
361
362
362
363
echo " Checking that CuDNN is available"
363
364
python -c ' import torch; exit(0 if torch.backends.cudnn.is_available() else 1)'
365
+ popd
364
366
fi # if libtorch
365
367
fi # if cuda
You can’t perform that action at this time.
0 commit comments