Skip to content

Commit 9156fc6

Browse files
using build version
1 parent 465380d commit 9156fc6

File tree

1 file changed

+12
-38
lines changed

1 file changed

+12
-38
lines changed

.github/scripts/ppc64le-build.sh

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,35 @@
33
# Environment variables
44
PACKAGE_NAME=pytorch
55
PACKAGE_VERSION=${PACKAGE_VERSION:-v2.4.0}
6-
export PYTORCH_BUILD_VERSION=2.6.0
7-
export PYTORCH_BUILD_NUMBER=1
8-
9-
# Clean up old artifacts (even though it's a new container)
10-
rm -rf build/ dist/ torch.egg-info/
116

127
cd /workspace/$PACKAGE_NAME
138

9+
# Clean up old artifacts
1410
rm -rf build/ dist/ torch.egg-info/
11+
1512
# Build and install PyTorch wheel
16-
if ! (MAX_JOBS=4 python setup.py bdist_wheel ); then
13+
if ! (MAX_JOBS=4 python setup.py bdist_wheel && pip install dist/*.whl); then
1714
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
1815
exit 1
1916
fi
2017

21-
# List all the wheels in the dist directory
22-
echo "Listing all generated wheel files:"
23-
ls dist/*.whl
24-
25-
# Get the single wheel file to install (you can adjust this to get only one wheel if multiple are generated)
26-
WHEEL_FILE=$(ls dist/*.whl | head -n 1)
27-
28-
# Ensure that only one wheel file is present, exit if there are multiple wheels
29-
WHEEL_COUNT=$(ls dist/*.whl | wc -l)
30-
if [ "$WHEEL_COUNT" -gt 1 ]; then
31-
echo "------------------$PACKAGE_NAME:multiple_wheels_detected-------------------------"
32-
exit 1
33-
fi
34-
35-
# Install the generated wheel
36-
if ! pip install "$WHEEL_FILE" --force-reinstall; then
37-
echo "------------------$PACKAGE_NAME:install_fails--------------------------------------"
38-
exit 1
39-
fi
4018
# Basic test to ensure installation success
41-
42-
43-
44-
# register PrivateUse1HooksInterface
45-
#python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_bfloat16
46-
#python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float16
47-
#python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float32
48-
#python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float64
19+
python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_bfloat16
20+
python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float16
21+
python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float32
22+
python test/test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float64
4923

5024
cd ..
5125
pip install pytest pytest-xdist
52-
#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
53-
# echo "------------------$PACKAGE_NAME:install_success_but_test_fails ###---------------------"
54-
# exit 0
55-
#fi
26+
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
27+
echo "------------------$PACKAGE_NAME:install_success_but_test_fails ###---------------------"
28+
exit 0
29+
fi
5630
echo "-----start test
5731
if ! pytest "$PACKAGE_NAME/test/test_utils.py"; then
5832
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
5933
exit 2
6034
else
61-
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
35+
echo "------------------$PACKAGE_NAME:install_and_test_both_success-------------------------"
6236
exit 0
6337
fi

0 commit comments

Comments
 (0)