Skip to content

Commit a0bc3ce

Browse files
timohlssheorey
andauthored
Support python 3.14 (#7406)
* Added support for python 3.14 * scipy version depends now on python version * Avoid building torch/tensorflow ops for 3.14 * Fixed CI to not test ml ops if torch is disabled (for 3.14) --------- Co-authored-by: Sameer Sheorey <[email protected]>
1 parent f38360c commit a0bc3ce

File tree

19 files changed

+145
-47
lines changed

19 files changed

+145
-47
lines changed

.github/ISSUE_TEMPLATE/0-build-issue-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ body:
8181
value: >
8282
- Operating system: Ubuntu 20.04 / macOS 10.15 / Windows 10 64-bit
8383
84-
- Python version: Python 3.8 / output from `import sys; print(sys.version)`
84+
- Python version: Python 3.14 / output from `import sys; print(sys.version)`
8585
8686
- Open3D version: output from python: `print(open3d.__version__)`
8787

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ body:
118118
value: >
119119
- Operating system: Ubuntu 20.04 / macOS 10.15 / Windows 10 64-bit
120120
121-
- Python version: Python 3.8 / output from `import sys; print(sys.version)`
121+
- Python version: Python 3.14 / output from `import sys; print(sys.version)`
122122
123123
- Open3D version: output from python: `print(open3d.__version__)`
124124

.github/workflows/macos.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
127127
matrix:
128128
os: [macos-14]
129-
python_version: ['3.10', '3.11', '3.12', '3.13']
129+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
130130
is_main:
131131
- ${{ github.ref == 'refs/heads/main' }}
132132
exclude:
@@ -136,12 +136,14 @@ jobs:
136136
python_version: '3.11'
137137
- is_main: false
138138
python_version: '3.12'
139+
- is_main: false
140+
python_version: '3.13'
139141

140142
env:
141143
# TensorFlow v2.19 only supports macOS-14 (Apple Silicon) and python 3.9-3.12
142-
BUILD_TENSORFLOW_OPS: ${{ ( matrix.python_version == '3.13' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
143-
# PyTorch 2.7 only supports macOS-14 (Apple Silicon)
144-
BUILD_PYTORCH_OPS: ${{ matrix.os == 'macos-13' && 'OFF' || 'ON' }}
144+
BUILD_TENSORFLOW_OPS: ${{ ( matrix.python_version >= '3.13' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
145+
# PyTorch 2.7 only supports macOS-14 (Apple Silicon) and python 3.9-3.13 (only torch>=2.9 supports python 3.14)
146+
BUILD_PYTORCH_OPS: ${{ ( matrix.python_version >= '3.14' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
145147
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
146148
steps:
147149
- name: Checkout source code
@@ -219,7 +221,7 @@ jobs:
219221
fail-fast: false
220222
matrix:
221223
os: [macos-14]
222-
python_version: ['3.10', '3.11', '3.12', '3.13']
224+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
223225
is_main:
224226
- ${{ github.ref == 'refs/heads/main' }}
225227
exclude:
@@ -229,13 +231,15 @@ jobs:
229231
python_version: '3.11'
230232
- is_main: false
231233
python_version: '3.12'
234+
- is_main: false
235+
python_version: '3.13'
232236

233237
env:
234238
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
235239
# TensorFlow v2.19 only supports macOS-14 (Apple Silicon) and python 3.9-3.12
236-
BUILD_TENSORFLOW_OPS: ${{ ( matrix.python_version == '3.13' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
237-
# PyTorch 2.7 only supports macOS-14 (Apple Silicon)
238-
BUILD_PYTORCH_OPS: ${{ matrix.os == 'macos-13' && 'OFF' || 'ON' }}
240+
BUILD_TENSORFLOW_OPS: ${{ ( matrix.python_version >= '3.13' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
241+
# PyTorch 2.7 only supports macOS-14 (Apple Silicon) and python 3.9-3.13 (only torch>=2.9 supports python 3.14)
242+
BUILD_PYTORCH_OPS: ${{ ( matrix.python_version >= '3.14' || matrix.os == 'macos-13' ) && 'OFF' || 'ON' }}
239243
steps:
240244
- name: Checkout source code
241245
uses: actions/checkout@v4

.github/workflows/ubuntu-openblas.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
python_version: ['3.10', '3.11', '3.12', '3.13']
44+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
4545
is_main:
4646
- ${{ github.ref == 'refs/heads/main' }}
4747
exclude:
@@ -51,6 +51,8 @@ jobs:
5151
python_version: '3.11'
5252
- is_main: false
5353
python_version: '3.12'
54+
- is_main: false
55+
python_version: '3.13'
5456
env:
5557
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
5658
PYTHON_VERSION: ${{ matrix.python_version }}
@@ -65,7 +67,7 @@ jobs:
6567
6668
- name: Compute Docker tag for this matrix entry
6769
run: |
68-
# Strip the dot: 3.838, 3.10310
70+
# Strip the dot: 3.12312, 3.14314
6971
PY_NO_DOT="${PYTHON_VERSION//./}"
7072
# Add “-dev” only when requested
7173
DEV_SUFFIX=$([ "${DEVELOPER_BUILD}" = "ON" ] && echo "-dev")

.github/workflows/ubuntu-wheel.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
python_version: ['3.10', '3.11', '3.12', '3.13']
36+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
3737
is_main:
3838
- ${{ github.ref == 'refs/heads/main' }}
3939
exclude:
@@ -43,11 +43,14 @@ jobs:
4343
python_version: '3.11'
4444
- is_main: false
4545
python_version: '3.12'
46+
- is_main: false
47+
python_version: '3.13'
4648
env:
4749
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
4850
PYTHON_VERSION: ${{ matrix.python_version }}
4951
CCACHE_TAR_NAME: open3d-ubuntu-2204-cuda-ci-ccache
5052
OPEN3D_CPU_RENDERING: true
53+
BUILD_PYTORCH_OPS: ${{ ( matrix.python_version >= '3.14' ) && 'OFF' || 'ON' }} # Only torch>=2.9 supports py3.14
5154
steps:
5255
- name: Checkout source code
5356
uses: actions/checkout@v4
@@ -67,8 +70,8 @@ jobs:
6770
docker/docker_build.sh cuda_wheel_py312_dev
6871
elif [ "${{ env.PYTHON_VERSION }}" = "3.13" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
6972
docker/docker_build.sh cuda_wheel_py313_dev
70-
elif [ "${{ env.PYTHON_VERSION }}" = "3.9" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
71-
docker/docker_build.sh cuda_wheel_py39
73+
elif [ "${{ env.PYTHON_VERSION }}" = "3.14" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
74+
docker/docker_build.sh cuda_wheel_py314_dev
7275
elif [ "${{ env.PYTHON_VERSION }}" = "3.10" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
7376
docker/docker_build.sh cuda_wheel_py310
7477
elif [ "${{ env.PYTHON_VERSION }}" = "3.11" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
@@ -77,6 +80,8 @@ jobs:
7780
docker/docker_build.sh cuda_wheel_py312
7881
elif [ "${{ env.PYTHON_VERSION }}" = "3.13" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
7982
docker/docker_build.sh cuda_wheel_py313
83+
elif [ "${{ env.PYTHON_VERSION }}" = "3.14" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
84+
docker/docker_build.sh cuda_wheel_py314
8085
fi
8186
PIP_PKG_NAME="$(basename ${GITHUB_WORKSPACE}/open3d-[0-9]*.whl)"
8287
PIP_CPU_PKG_NAME="$(basename ${GITHUB_WORKSPACE}/open3d_cpu*.whl)"
@@ -124,7 +129,7 @@ jobs:
124129
strategy:
125130
fail-fast: false
126131
matrix:
127-
python_version: ['3.10', '3.11', '3.12', '3.13']
132+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
128133
is_main:
129134
- ${{ github.ref == 'refs/heads/main' }}
130135
exclude:
@@ -134,8 +139,11 @@ jobs:
134139
python_version: '3.11'
135140
- is_main: false
136141
python_version: '3.12'
142+
- is_main: false
143+
python_version: '3.13'
137144
env:
138145
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
146+
BUILD_PYTORCH_OPS: ${{ ( matrix.python_version >= '3.14' ) && 'OFF' || 'ON' }} # Used here to disable GPU tests for py3.14 until torch supports it
139147
steps:
140148
- name: Checkout source code
141149
uses: actions/checkout@v4

.github/workflows/windows.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ jobs:
259259
fail-fast: false
260260
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
261261
matrix:
262-
python_version: ['3.10', '3.11', '3.12', '3.13']
262+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
263263
is_main:
264264
- ${{ github.ref == 'refs/heads/main' }}
265265
exclude:
@@ -269,6 +269,12 @@ jobs:
269269
python_version: '3.11'
270270
- is_main: false
271271
python_version: '3.12'
272+
- is_main: false
273+
python_version: '3.13'
274+
275+
env:
276+
# PyTorch 2.7 supports python 3.10-3.13. PyTorch 2.9 supports python 3.14.
277+
BUILD_PYTORCH_OPS: ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }}
272278

273279
steps:
274280
- name: Checkout source code
@@ -296,8 +302,10 @@ jobs:
296302
python -m pip install maturin==1.7.8
297303
python -m pip install -U -r python/requirements.txt `
298304
-r python/requirements_build.txt `
299-
-r python/requirements_jupyter_build.txt `
300-
-r open3d_ml/requirements-torch.txt
305+
-r python/requirements_jupyter_build.txt
306+
if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'ON') {
307+
python -m pip install -U -r open3d_ml/requirements-torch.txt
308+
}
301309
302310
303311
- name: Config
@@ -318,7 +326,7 @@ jobs:
318326
-DBUILD_LIBREALSENSE=ON `
319327
-DBUILD_WEBRTC=ON `
320328
-DBUILD_JUPYTER_EXTENSION=ON `
321-
-DBUILD_PYTORCH_OPS=ON `
329+
-DBUILD_PYTORCH_OPS=${{ env.BUILD_PYTORCH_OPS }} `
322330
${{ env.SRC_DIR }}
323331
324332
- name: Build Python package
@@ -353,7 +361,7 @@ jobs:
353361
strategy:
354362
fail-fast: false
355363
matrix:
356-
python_version: ['3.10', '3.11', '3.12', '3.13']
364+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
357365
is_main:
358366
- ${{ github.ref == 'refs/heads/main' }}
359367
exclude:
@@ -363,7 +371,11 @@ jobs:
363371
python_version: '3.11'
364372
- is_main: false
365373
python_version: '3.12'
366-
374+
- is_main: false
375+
python_version: '3.13'
376+
env:
377+
# PyTorch 2.7 supports python 3.10-3.13. PyTorch 2.9 supports python 3.14.
378+
BUILD_PYTORCH_OPS: ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }}
367379
steps:
368380
- name: Checkout source code
369381
uses: actions/checkout@v4
@@ -394,8 +406,10 @@ jobs:
394406
open3d_test_venv\Scripts\Activate.ps1
395407
python -m pip install -U pip==${{ env.PIP_VER }}
396408
python -m pip install -U -r python/requirements_build.txt `
397-
-r python/requirements_test.txt `
398-
-r open3d_ml/requirements-torch.txt
409+
-r python/requirements_test.txt
410+
if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'ON') {
411+
python -m pip install -U -r open3d_ml/requirements-torch.txt
412+
}
399413
$py_tag=(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
400414
if (Test-Path -Path "pip_package") {
401415
$PIP_PKG_NAME=(Get-ChildItem pip_package\open3d*-$py_tag-*.whl).Name
@@ -414,5 +428,10 @@ jobs:
414428
open3d_test_venv\Scripts\Activate.ps1
415429
echo "Running Open3D python tests..."
416430
echo "Add --randomly-seed=SEED to the test command to reproduce test order."
417-
python -m pytest python/test/
431+
$pytest_args = @("python/test/")
432+
if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'OFF') {
433+
echo "Testing ML Ops disabled"
434+
$pytest_args += "--ignore=python/test/ml_ops/"
435+
}
436+
python -m pytest @pytest_args
418437
deactivate

3rdparty/README_SYCL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ referring to "DPC++".
2525

2626
# We'll be using oneAPI's distribution of conda and Python
2727
# Python 3.6+ will work
28-
conda create -n sycl python=3.8
28+
conda create -n sycl python=3.10
2929
conda activate sycl
3030
```
3131
4. Check your environment
3232
```bash
3333
which icx # /opt/intel/oneapi/compiler/<version>/linux/bin/icx
3434
which icpx # /opt/intel/oneapi/compiler/<version>/linux/bin/icpx
3535
which python # ${HOME}/.conda/envs/sycl/bin/python
36-
python --version # Python 3.8.12 :: Intel Corporation
36+
python --version # Python 3.10.0 :: Intel Corporation
3737
```
3838
5. Config and build
3939
```bash

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
- Fix linker error "library limit of 65535 objects exceeded" with Ninja generator on MSVC (PR #7335)
7272
- Download tarballs instead of Git repos for "3rdparty/uvatlas" (PR #7371)
7373
- macOS x86_64 not longer supported, only macOS arm64 is supported.
74+
- Python 3.13+3.14 support
7475

7576

7677
## 0.13

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ From the author:
6666
## Python quick start
6767

6868
Pre-built pip packages support Ubuntu 20.04+, macOS 10.15+ and Windows 10+
69-
(64-bit) with Python 3.8-3.11.
69+
(64-bit) with Python 3.10-3.14.
7070

7171
```bash
7272
# Install

cpp/open3d/ml/pytorch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ find_package(Pytorch REQUIRED)
88

99
if (Python3_VERSION VERSION_GREATER_EQUAL 3.9 AND Pytorch_VERSION VERSION_LESS 1.8.0)
1010
message(FATAL_ERROR "Please update to PyTorch 1.8.0+ to build PyTorch Ops "
11-
"with Python 3.9 to prevent a segmentation fault. See "
11+
"with Python >=3.9 to prevent a segmentation fault. See "
1212
"https://github.com/pytorch/pytorch/issues/50014 for details")
1313
endif()
1414

0 commit comments

Comments
 (0)