Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for python3.11 #1

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f8fbef1
support msgpack 6.0 (#6269)
cielavenir Aug 9, 2023
a9370f2
Voxel Downsample for Tensor interface (#6249)
theNded Aug 11, 2023
c46e64a
improve 6120 (OpenCV pose estimation bug fix) (#6306)
theNded Aug 14, 2023
75dccb4
fix segment plane non deterministic sampler issue and add unit test …
yuecideng Aug 14, 2023
a89031c
SimplifyQuadricDecimation fixes (#6163)
bjudeworley Aug 15, 2023
1012819
Fixes #6291 and #6236 (#6305)
theNded Aug 15, 2023
c7718fd
Improve documentation (#6307)
saurabheights Aug 17, 2023
a6cab5b
Add support for python3.11
OlivierLDff Jul 28, 2023
95ed4d1
️upgrade pytorch to 2.0.1 with cuda 11.7 in ci_utils
OlivierLDff Aug 17, 2023
32a1f1e
ci(linux): introduce python 3.11 in docker tests script
OlivierLDff Aug 17, 2023
8f7b138
ci(linux): delete unused env variable BUILD_TENSORFLOW_OPS & BUILD_PY…
OlivierLDff Aug 17, 2023
03e3392
ci: upgrade tensorflow to 2.12.0 & tensorboard to 2.14.0
OlivierLDff Aug 17, 2023
d892962
ci(linux): disable tensorflow build, due to cxx abi issue
OlivierLDff Aug 17, 2023
a5c2c66
ci(linux): always use cxx11_abi
OlivierLDff Aug 17, 2023
f8db0bd
drop support for python3.7
OlivierLDff Aug 17, 2023
83a2f41
temp commit to test open3d-ml update
OlivierLDff Aug 17, 2023
3f683a6
temp: try to ignore macos framework?
OlivierLDff Aug 17, 2023
83b0643
temp: try to update cmake osx min version to see if it can fix some b…
OlivierLDff Aug 17, 2023
59792c2
Use standard filesystem instead of experimental for Clang on macOS (#…
errissa Aug 18, 2023
1ac3f48
Merge branch 'master' into support-python-311
ssheorey Aug 18, 2023
b601cee
Bump certifi lib from 2022.12.7 to 2023.7.22 (#6282)
dependabot[bot] Aug 28, 2023
5ba4a42
Fix incomplete VoxelGrid creation from triangles intersecting multipl…
sharon-br Aug 29, 2023
3db1647
add add_voxel and remove_voxel in pybind for VoxelGrid::AddVoxel, Vox…
ohkwon718 Aug 29, 2023
0f12276
Fix rendering of Python versions table (#6162)
johnthagen Aug 29, 2023
9d88662
:sparkles: Support multi-threading in the RayCastingScene function to…
sebastienmascha Aug 29, 2023
b620539
Display RGBD frames as a point cloud video (#6342)
ssheorey Sep 1, 2023
5b6ef4b
Build fixes MSVC and gcc (#6039)
ssheorey Sep 7, 2023
739bb07
Fix path to executable in viewer deb (#5996)
simonschmeisser Sep 14, 2023
b7f9f3a
Debian Open3D package in CI (#6044)
ssheorey Sep 14, 2023
cb6efb0
Python 3.11 on macOS
ssheorey Sep 22, 2023
7f66c77
Merge branch 'master' of github.com:isl-org/Open3D into support-pytho…
ssheorey Sep 22, 2023
6b7f095
TensorFlow / Tensorboard 2.13
ssheorey Sep 22, 2023
7236e33
Ignore tensorflow tests if TF / open3d.ml.tf is not available.
ssheorey Sep 25, 2023
0ca03ad
Style fix and...
ssheorey Sep 25, 2023
c61fb71
C++17 only if TF ops are enabled
ssheorey Oct 3, 2023
7f9a3be
Don't build tf_ops explicitly.
ssheorey Oct 13, 2023
52206a5
Move BUILD_TF/TORCH_OPS settings to github actions file
ssheorey Oct 13, 2023
8af2f8f
Set cxx11_abi based on tf / torch ops in ci_utls.sh
ssheorey Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'

- name: Install dependencies
env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
brew install ccache pkg-config
Expand Down Expand Up @@ -127,16 +127,16 @@ jobs:
fail-fast: false
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'

env:
BUILD_CUDA_MODULE: OFF
Expand Down Expand Up @@ -234,16 +234,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'

env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Install dependencies
run: |
pip install -U clang-format~=10.0.0 yapf==0.30.0 nbformat
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ concurrency:

env:
GCE_CLI_GHA_VERSION: '416.0.0' # Fixed to avoid dependency on API changes
BUILD_CUDA_MODULE: 'ON'
BUILD_PYTORCH_OPS: 'ON'
BUILD_TENSORFLOW_OPS: 'OFF' # Turn ON when cxx11_abi is same for TF and PyTorch

jobs:
build-wheel:
Expand All @@ -27,16 +30,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'
env:
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
PYTHON_VERSION: ${{ matrix.python_version }}
Expand All @@ -53,22 +56,22 @@ jobs:
# `docker/docker_build.sh xxx` command to execute locally.
- name: Docker build
run: |
if [ "${{ env.PYTHON_VERSION }}" = "3.7" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py37_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.8" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
if [ "${{ env.PYTHON_VERSION }}" = "3.8" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py38_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.9" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py39_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.10" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py310_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.7" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py37
elif [ "${{ env.PYTHON_VERSION }}" = "3.11" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py311_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.8" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py38
elif [ "${{ env.PYTHON_VERSION }}" = "3.9" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py39
elif [ "${{ env.PYTHON_VERSION }}" = "3.10" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py310
elif [ "${{ env.PYTHON_VERSION }}" = "3.11" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py311
fi
PIP_PKG_NAME="$(basename ${GITHUB_WORKSPACE}/open3d-[0-9]*.whl)"
PIP_CPU_PKG_NAME="$(basename ${GITHUB_WORKSPACE}/open3d_cpu*.whl)"
Expand Down Expand Up @@ -114,16 +117,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'
env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
steps:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
env:
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
BUILD_CUDA_MODULE: OFF
BUILD_TENSORFLOW_OPS: ${{ matrix.MLOPS }}
BUILD_PYTORCH_OPS: ${{ matrix.MLOPS }}
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
OPEN3D_CPU_RENDERING: true
steps:
Expand Down Expand Up @@ -79,6 +77,13 @@ jobs:
name: open3d-devel-linux-x86_64
path: open3d-devel-*.tar.xz
if-no-files-found: error
- name: Upload viewer to GitHub artifacts
if: ${{ env.BUILD_SHARED_LIBS == 'OFF' }}
uses: actions/upload-artifact@v3
with:
name: open3d-viewer-Linux
path: open3d-viewer-*-Linux.deb
if-no-files-found: error
- name: GCloud CLI auth
if: ${{ github.ref == 'refs/heads/master' }}
uses: 'google-github-actions/auth@v1'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/vtk_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:

Linux:
# TODO: Convert to docker
runs-on: ubuntu-18.04
steps:
- name: Checkout source code
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ concurrency:
cancel-in-progress: true

env:
PIP_VER: "21.1.1"
PIP_VER: "23.2.1"
WHEEL_VER: "0.38.4"
STOOLS_VER: "67.3.2"
PYTEST_VER: "7.1.2"
PYTEST_RANDOMLY_VER: "3.8.0"
SCIPY_VER: "1.7.3"
JEDI_VER: "0.17.2" # https://github.com/ipython/ipython/issues/12740
IDNA_VER: "2.8" # https://github.com/psf/requests/issues/5710
TENSORBOARD_VER: "2.8"
SRC_DIR: "D:\\a\\open3d\\open3d"
BUILD_DIR: "C:\\Open3D\\build"
NPROC: 2
Expand Down Expand Up @@ -101,7 +97,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Config
# Move build directory to C: https://github.com/actions/virtual-environments/issues/1341
Expand Down Expand Up @@ -246,16 +242,16 @@ jobs:
fail-fast: false
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'

steps:
- name: Checkout source code
Expand Down Expand Up @@ -351,16 +347,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10', '3.11']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: '3.7'
- is_master: false
python_version: '3.8'
- is_master: false
python_version: '3.9'
- is_master: false
python_version: '3.10'

steps:
- name: Checkout source code
Expand Down Expand Up @@ -388,10 +384,7 @@ jobs:
python -m pip install --upgrade pip==${{ env.PIP_VER }} `
wheel==${{ env.WHEEL_VER }} `
setuptools==${{ env.STOOLS_VER }}
python -m pip install -U pytest==${{ env.PYTEST_VER }}
python -m pip install -U pytest-randomly==${{ env.PYTEST_RANDOMLY_VER }}
python -m pip install -U scipy==${{ env.SCIPY_VER }} `
tensorboard==${{ env.TENSORBOARD_VER }}
python -m pip install -U -r python/requirements_test.txt
$py_tag=(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
if (Test-Path -Path "pip_package") {
$PIP_PKG_NAME=(Get-ChildItem pip_package\open3d*-$py_tag-*.whl).Name
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ docs/tutorial/**/*.ply
docs/tutorial/**/*.pcd
docs/tutorial/**/*.json
docs/_out/
docs/_build/
docs/python_api/
docs/python_example/
docs/conf.py
Expand Down
45 changes: 35 additions & 10 deletions 3rdparty/cmake/FindPytorch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,43 @@ foreach(lib ${TORCH_LIBRARIES})
endforeach(lib)

# Check if the c++11 ABI is compatible on Linux
if(UNIX AND NOT APPLE AND ((Pytorch_CXX11_ABI AND (NOT GLIBCXX_USE_CXX11_ABI)) OR
(NOT Pytorch_CXX11_ABI AND GLIBCXX_USE_CXX11_ABI)))
if(Pytorch_CXX11_ABI)
set(NEEDED_ABI_FLAG "ON")
if(UNIX AND NOT APPLE)
if((Pytorch_CXX11_ABI AND (NOT GLIBCXX_USE_CXX11_ABI)) OR
(NOT Pytorch_CXX11_ABI AND GLIBCXX_USE_CXX11_ABI))
if(Pytorch_CXX11_ABI)
set(NEEDED_ABI_FLAG "ON")
else()
set(NEEDED_ABI_FLAG "OFF")
endif()
message(FATAL_ERROR "PyTorch and Open3D ABI mismatch: ${Pytorch_CXX11_ABI} != ${GLIBCXX_USE_CXX11_ABI}.\n"
"Please use -DGLIBCXX_USE_CXX11_ABI=${NEEDED_ABI_FLAG} "
"in the cmake config command to change the Open3D ABI.")
else()
set(NEEDED_ABI_FLAG "OFF")
message(STATUS "PyTorch matches Open3D ABI: ${Pytorch_CXX11_ABI} == ${GLIBCXX_USE_CXX11_ABI}")
endif()
message(FATAL_ERROR "PyTorch and Open3D ABI mismatch: ${Pytorch_CXX11_ABI} != ${GLIBCXX_USE_CXX11_ABI}.\n"
"Please use -DGLIBCXX_USE_CXX11_ABI=${NEEDED_ABI_FLAG} "
"in the cmake config command to change the Open3D ABI.")
else()
message(STATUS "PyTorch matches Open3D ABI: ${Pytorch_CXX11_ABI} == ${GLIBCXX_USE_CXX11_ABI}")
endif()

message(STATUS "Pytorch_VERSION: ${Pytorch_VERSION}, CUDAToolkit_VERSION: ${CUDAToolkit_VERSION}")
if (BUILD_PYTORCH_OPS AND BUILD_CUDA_MODULE AND CUDAToolkit_VERSION
VERSION_GREATER_EQUAL "11.0" AND Pytorch_VERSION VERSION_LESS
"1.9")
message(WARNING
"--------------------------------------------------------------------------------\n"
" \n"
" You are compiling PyTorch ops with CUDA 11 with PyTorch version < 1.9. This \n"
" configuration may have stability issues. See \n"
" https://github.com/isl-org/Open3D/issues/3324 and \n"
" https://github.com/pytorch/pytorch/issues/52663 for more information on this \n"
" problem. \n"
" \n"
" We recommend to compile PyTorch from source with compile flags \n"
" '-Xcompiler -fno-gnu-unique' \n"
" \n"
" or use the PyTorch wheels at \n"
" https://github.com/isl-org/open3d_downloads/releases/tag/torch1.8.2 \n"
" \n"
"--------------------------------------------------------------------------------\n"
)
endif()

include(FindPackageHandleStandardArgs)
Expand Down
26 changes: 14 additions & 12 deletions 3rdparty/cmake/FindTensorflow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(NOT Tensorflow_FOUND)
# Get Tensorflow_FRAMEWORK_LIB
find_library(
Tensorflow_FRAMEWORK_LIB
NAMES tensorflow_framework libtensorflow_framework.so.2
NAMES tensorflow_framework tensorflow_framework.2 libtensorflow_framework.so.2
PATHS "${Tensorflow_LIB_DIR}"
NO_DEFAULT_PATH
)
Expand All @@ -59,21 +59,23 @@ if (UNIX AND NOT APPLE)
endif()

# Check if the c++11 ABI is compatible
if(UNIX AND NOT APPLE AND ((Tensorflow_CXX11_ABI AND (NOT GLIBCXX_USE_CXX11_ABI)) OR
(NOT Tensorflow_CXX11_ABI AND GLIBCXX_USE_CXX11_ABI)))
if(TensorFlow_CXX11_ABI)
set(NEEDED_ABI_FLAG "ON")
if (UNIX AND NOT APPLE)
if(((Tensorflow_CXX11_ABI AND (NOT GLIBCXX_USE_CXX11_ABI)) OR
(NOT Tensorflow_CXX11_ABI AND GLIBCXX_USE_CXX11_ABI)))
if(TensorFlow_CXX11_ABI)
set(NEEDED_ABI_FLAG "ON")
else()
set(NEEDED_ABI_FLAG "OFF")
endif()
message(FATAL_ERROR "TensorFlow and Open3D ABI mismatch: ${Tensorflow_CXX11_ABI} != ${GLIBCXX_USE_CXX11_ABI}.\n"
"Please use -D GLIBCXX_USE_CXX11_ABI=${NEEDED_ABI_FLAG} "
"in the cmake config command to change the Open3D ABI.")
else()
set(NEEDED_ABI_FLAG "OFF")
message(STATUS "TensorFlow matches Open3D ABI: ${Tensorflow_CXX11_ABI} == ${GLIBCXX_USE_CXX11_ABI}")
endif()
message(FATAL_ERROR "TensorFlow and Open3D ABI mismatch: ${Tensorflow_CXX11_ABI} != ${GLIBCXX_USE_CXX11_ABI}.\n"
"Please use -D GLIBCXX_USE_CXX11_ABI=${NEEDED_ABI_FLAG} "
"in the cmake config command to change the Open3D ABI.")
else()
message(STATUS "TensorFlow matches Open3D ABI: ${Tensorflow_CXX11_ABI} == ${GLIBCXX_USE_CXX11_ABI}")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Tensorflow DEFAULT_MSG Tensorflow_INCLUDE_DIR Tensorflow_LIB_DIR
Tensorflow_FRAMEWORK_LIB Tensorflow_DEFINITIONS)
Tensorflow_DEFINITIONS)
10 changes: 8 additions & 2 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1456,9 +1456,15 @@ endif()
# msgpack
if(USE_SYSTEM_MSGPACK)
open3d_find_package_3rdparty_library(3rdparty_msgpack
PACKAGE msgpack
TARGETS msgpackc
PACKAGE msgpack-cxx
TARGETS msgpack-cxx
)
if(NOT 3rdparty_msgpack_FOUND)
open3d_find_package_3rdparty_library(3rdparty_msgpack
PACKAGE msgpack
TARGETS msgpackc
)
endif()
if(NOT 3rdparty_msgpack_FOUND)
open3d_pkg_config_3rdparty_library(3rdparty_msgpack
SEARCH_ARGS msgpack
Expand Down
5 changes: 2 additions & 3 deletions 3rdparty/fmt/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ include(ExternalProject)

set(FMT_LIB_NAME fmt)

if (MSVC AND MSVC_VERSION VERSION_LESS 1930 OR
CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
# MSVC 17.x required for building fmt >6
if (MSVC OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
# MSVC has errors when building fmt >6, up till 9.1
# SYCL / DPC++ needs fmt ver <=6 or >= 9.2: https://github.com/fmtlib/fmt/issues/3005
set(FMT_VER "6.0.0")
set(FMT_SHA256
Expand Down
Loading