File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Environment variables
4+ PACKAGE_NAME=pytorch
5+ PACKAGE_VERSION=${PACKAGE_VERSION:- v2.4.0}
6+
7+ cd /workspace/$PACKAGE_NAME
8+
9+ # Build and install PyTorch wheel
10+ if ! (MAX_JOBS=4 python setup.py bdist_wheel && pip install dist/* .whl); then
11+ echo " ------------------$PACKAGE_NAME :install_fails-------------------------------------"
12+ exit 1
13+ fi
14+
15+ # Basic test to ensure installation success
16+
17+
18+
19+ # register PrivateUse1HooksInterface
20+ python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_bfloat16
21+ python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float16
22+ python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float32
23+ python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float64
24+
25+ cd ..
26+ pip install pytest pytest-xdist
27+ # if ! pytest -n $(nproc) -vvvv $PACKAGE_NAME/test/common_extended_utils.py $PACKAGE_NAME/test/common_utils.py $PACKAGE_NAME/test/smoke_test.py $PACKAGE_NAME/test/test_architecture_ops.py $PACKAGE_NAME/test/test_datasets_video_utils_opt.py $PACKAGE_NAME/test/test_tv_tensors.py; then
28+ # echo "------------------$PACKAGE_NAME:install_success_but_test_fails ###---------------------"
29+ # exit 0
30+ # fi
31+ echo " -----start test
32+ if ! pytest " $PACKAGE_NAME /test/test_utils.py" ; then
33+ echo " ------------------$PACKAGE_NAME :install_success_but_test_fails---------------------"
34+ exit 2
35+ else
36+ echo " ------------------$PACKAGE_NAME :install_& _test_both_success-------------------------"
37+ exit 0
38+ fi
You can’t perform that action at this time.
0 commit comments