44#
55# Usage: ./ci/run_ci.sh [cpu|cuda|xpu]
66#
7- # cpu — open3d_cpu wheel, PyTorch CPU; integration + TF tests only (no torch
8- # CPU/accelerator parity). Used on GitHub Actions.
9- # cuda — open3d (CUDA) wheel, PyTorch+cu126; full suite including
10- # tests/test_models_torch.py parity (requires NVIDIA GPU).
11- # xpu — open3d_xpu wheel, PyTorch+XPU; full suite including parity
12- # (requires Intel GPU; torch.xpu.is_available()).
7+ # cpu — open3d_cpu wheel + requirements-torch.txt
8+ # cuda — default open3d manylinux wheel + requirements-torch-cuda.txt
9+ # xpu — open3d_xpu wheel + requirements-torch-xpu.txt
1310#
14- # Parity tests (tests/test_models_torch.py) are intentionally omitted for the
15- # cpu variant: GitHub-hosted runners have no GPU, and parity needs a real
16- # accelerator. See docs/howtos.md.
11+ # Pytest skips (parity, accelerator-only ops, missing ops) are handled in the
12+ # test modules. See docs/howtos.md.
1713
1814set -euo pipefail
1915
2016usage () {
21- sed -n ' 2,16p ' " $0 " | sed ' s/^# \?//'
17+ sed -n ' 2,12p ' " $0 " | sed ' s/^# \?//'
2218 echo
2319 echo " Example: ./ci/run_ci.sh cpu"
2420 exit " ${1:- 0} "
@@ -43,25 +39,20 @@ case "${BACKEND}" in
4339 cpu)
4440 WHEEL_GLOB=" open3d_cpu-*-${PY_TAG} -${PY_TAG} -manylinux*_x86_64.whl"
4541 TORCH_REQUIREMENTS=" requirements-torch.txt"
46- INCLUDE_PARITY_TESTS=false
4742 ;;
4843 cuda)
49- # Default manylinux wheel (not open3d_cpu / open3d_xpu).
5044 WHEEL_GLOB=" open3d-[0-9]*-${PY_TAG} -${PY_TAG} -manylinux*_x86_64.whl"
5145 TORCH_REQUIREMENTS=" requirements-torch-cuda.txt"
52- INCLUDE_PARITY_TESTS=true
5346 ;;
5447 xpu)
5548 WHEEL_GLOB=" open3d_xpu-*-${PY_TAG} -${PY_TAG} -manylinux*_x86_64.whl"
5649 TORCH_REQUIREMENTS=" requirements-torch-xpu.txt"
57- INCLUDE_PARITY_TESTS=true
5850 ;;
5951esac
6052
6153echo " Open3D-ML CI backend: ${BACKEND} "
6254echo " wheel pattern: ${WHEEL_GLOB} "
6355echo " torch requirements: ${TORCH_REQUIREMENTS} "
64- echo " torch parity tests (test_models_torch.py): ${INCLUDE_PARITY_TESTS} "
6556echo
6657
6758echo " 1. Download the latest Open3D devel wheel from ${OPEN3D_REPO} @${RELEASE_TAG} "
@@ -91,58 +82,18 @@ python -m pip install "${WHEEL_PATH}"
9182
9283echo " 3. Sanity-check the installed package"
9384echo
94- python -W default -c "
95- import open3d
96- print('Installed:', open3d)
97- print('BUILD_PYTORCH_OPS:', open3d._build_config['BUILD_PYTORCH_OPS'])
98- print('BUILD_SYCL_MODULE:', open3d._build_config.get('BUILD_SYCL_MODULE'))
99- print('CUDA available:', open3d.core.cuda.is_available())
100- print('SYCL available:', open3d.core.sycl.is_available())
101- "
85+ python -W default -c " import open3d; print('Installed:', open3d)"
10286
10387echo " 4. Install Open3D-ML dependencies"
10488echo
10589export PATH_TO_OPEN3D_ML=" $PWD "
10690python -m pip install -r requirements.txt -r " ${TORCH_REQUIREMENTS} " \
10791 -r requirements-tensorflow.txt
10892
109- echo " 4b. PyTorch accelerator visibility"
110- echo
111- python -c "
112- import torch
113- print('torch:', torch.__version__)
114- print('torch.cuda.is_available():', torch.cuda.is_available())
115- if hasattr(torch, 'xpu'):
116- print('torch.xpu.is_available():', torch.xpu.is_available())
117- "
118-
119- if [[ " ${INCLUDE_PARITY_TESTS} " == true ]]; then
120- python -c "
121- import open3d as o3d
122- import torch
123- import sys
124- backend = '${BACKEND} '
125- if backend == 'cuda' and not torch.cuda.is_available():
126- sys.exit('cuda CI variant requires torch.cuda.is_available()')
127- if backend == 'xpu' and not (hasattr(torch, 'xpu') and torch.xpu.is_available()):
128- sys.exit('xpu CI variant requires torch.xpu.is_available()')
129- print('Accelerator check passed for', backend)
130- "
131- fi
132-
133- if [[ " ${INCLUDE_PARITY_TESTS} " == true ]]; then
134- TEST_TARGETS=(tests)
135- else
136- TEST_TARGETS=(
137- tests/test_integration.py
138- tests/test_models_tf.py
139- )
140- fi
141-
14293run_test_suite () {
143- echo " Running: ./tests/run_tests.sh ${TEST_TARGETS[*]} "
94+ echo " Running: ./tests/run_tests.sh tests "
14495 echo " Add --randomly-seed=SEED via pytest env if reproducing order."
145- ./tests/run_tests.sh " ${TEST_TARGETS[@]} "
96+ ./tests/run_tests.sh tests
14697}
14798
14899echo " 5. Run the Open3D-ML pytest suite against the installed wheel"
0 commit comments