Skip to content

Commit 3c16a15

Browse files
added script
1 parent d8143b1 commit 3c16a15

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/scripts/ppc64le-build.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

0 commit comments

Comments
 (0)