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

[Test, do not merge] Support python 312 mirror #6977

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6607677
python3.12 support
swheaton Mar 25, 2024
4ba2d39
tensorboard bump
swheaton Mar 25, 2024
17baa25
typo
swheaton Mar 25, 2024
fae3dff
what is happening with my typo fixing
swheaton Mar 25, 2024
8a2cc17
bump scipy
swheaton Mar 25, 2024
66f8800
unrelated style check fix
swheaton Mar 25, 2024
5303613
scipy 1.11.4 required for python3.12, otherwise unchanged
swheaton Mar 25, 2024
e5dd29c
tensorboard 2.16.2 required for python3.12, otherwise unchanged
swheaton Mar 25, 2024
15abf18
fix improper error fstring
swheaton Mar 26, 2024
e9a6d71
Merge branch 'main' of github.com:isl-org/Open3D into support-python-312
ssheorey Jul 13, 2024
d96ecbf
Update windows CUDA version to match Linux, TF version, torch as late…
ssheorey Jul 16, 2024
9e1b5ae
use c++17 if pytorch ops are enabled
benjaminum Aug 14, 2024
da622f4
Merge branch 'main' into support-python-312
benjaminum Aug 14, 2024
1ff496f
update url for Windows CUDA installer
benjaminum Aug 14, 2024
164a01a
Update Windows MSVC to CUDA 11.8
ssheorey Aug 20, 2024
ea0c66d
Merge branch 'main' into support-python-312
ssheorey Aug 20, 2024
0c4132b
Merge branch 'main' of github.com:isl-org/Open3D into support-python-312
ssheorey Aug 20, 2024
945e35d
Always obey CMAKE_CUDA_ARCHITECTURES if used.
ssheorey Aug 22, 2024
2222fcb
use shared_ptr to capture array in lambda
benjaminum Aug 28, 2024
35ee51e
fix tf ml ops tests on macos
benjaminum Sep 1, 2024
170b650
apply style
benjaminum Sep 4, 2024
68fca39
Install thrust with CUDA
ssheorey Sep 7, 2024
6314046
Remove fmt formatter for embree RTCError to fix macOS error
ssheorey Sep 13, 2024
5cddb82
Merge branch 'main' of github.com:isl-org/Open3D into support-python-312
ssheorey Sep 13, 2024
99bc91f
switch to miniforge
benjaminum Sep 15, 2024
7cdd7e3
use cuda 12.3 as suggested here https://github.com/tensorflow/tensorf…
benjaminum Sep 15, 2024
13699e8
change to cuda 12.1 for pytorch and tensorflow
benjaminum Sep 16, 2024
267df1a
set TORCH_CUDA_ARCH_LIST as workaround for CUDA 12 and Pytorch <2.4
benjaminum Sep 17, 2024
8fc1bd7
Merge branch 'main' into bu/support-python-312-mirror
benjaminum Sep 18, 2024
cc01512
fix failed merge
benjaminum Sep 19, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
# macos-12 is Intel runner, macos-14 is Apple Silicon
# https://github.com/actions/runner-images
os: [macos-12, macos-14]
python_version: ['3.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -209,6 +209,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'

env:
BUILD_CUDA_MODULE: OFF
Expand Down Expand Up @@ -310,12 +312,14 @@ 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.10', '3.11']
python_version: ['3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'
steps:
- name: Checkout source code # for gh release upload
uses: actions/checkout@v4
Expand Down Expand Up @@ -374,7 +378,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-12, macos-14]
python_version: ['3.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -388,6 +392,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'

env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
Expand All @@ -399,6 +405,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: isl-org/Open3D-ML
ref: ss/python-3.12 # remove before merge
path: ${{ env.OPEN3D_ML_ROOT }}

- name: Download wheels
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -43,6 +43,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'
env:
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
PYTHON_VERSION: ${{ matrix.python_version }}
Expand All @@ -67,6 +69,8 @@ jobs:
docker/docker_build.sh cuda_wheel_py310_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.11" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py311_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.12" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py312_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
Expand All @@ -75,6 +79,8 @@ jobs:
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
elif [ "${{ env.PYTHON_VERSION }}" = "3.12" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py312
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 @@ -122,7 +128,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -132,6 +138,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'
env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
steps:
Expand All @@ -145,6 +153,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: isl-org/Open3D-ML
ref: ss/python-3.12 # remove before merge
path: ${{ env.OPEN3D_ML_ROOT }}
- name: Download wheels
uses: actions/download-artifact@v4
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:
STOOLS_VER: "67.3.2"
JEDI_VER: "0.17.2" # https://github.com/ipython/ipython/issues/12740
IDNA_VER: "2.8" # https://github.com/psf/requests/issues/5710
CUDA_VERSION: "11.8.0"
SRC_DIR: "D:\\a\\open3d\\open3d"
BUILD_DIR: "C:\\Open3D\\build"
NPROC: 2
Expand All @@ -47,7 +48,6 @@ jobs:
STATIC_RUNTIME: ON
include:
- BUILD_CUDA_MODULE: ON
CUDA_VERSION: 11.0.3
env:
BUILD_WEBRTC: ${{ ( matrix.BUILD_SHARED_LIBS == 'OFF' && matrix.STATIC_RUNTIME == 'ON' ) && 'ON' || 'OFF' }}

Expand All @@ -64,20 +64,20 @@ jobs:
if: ${{ matrix.BUILD_CUDA_MODULE == 'ON' }}
run: |
# Define variables
$CUDA_VER_FULL = "${{ matrix.CUDA_VERSION }}"
$CUDA_VER_FULL = "${{ env.CUDA_VERSION }}"
$CUDA_VER_ARR = $CUDA_VER_FULL.Split(".")
$CUDA_VER = "$($CUDA_VER_ARR[0]).$($CUDA_VER_ARR[1])"
$CUDA_VER_ID = "$($CUDA_VER_ARR[0])_$($CUDA_VER_ARR[1])"
# Installer url
if ( $CUDA_VER_ARR[0] -ge 11 ) {
$CUDA_URL = "http://developer.download.nvidia.com/compute/cuda/$CUDA_VER_FULL/network_installers/cuda_$($CUDA_VER_FULL)_win10_network.exe"
$CUDA_URL = "http://developer.download.nvidia.com/compute/cuda/$CUDA_VER_FULL/network_installers/cuda_$($CUDA_VER_FULL)_windows_network.exe"
} else {
$CUDA_URL = "http://developer.download.nvidia.com/compute/cuda/$CUDA_VER/Prod/network_installers/cuda_$($CUDA_VER_FULL)_win10_network.exe"
}
# Installer arguments
$CUDA_INSTALL_ARGS = "-s"
# Required packages
$CUDA_PACKAGES = "nvcc", "visual_studio_integration", "cublas", "cublas_dev", "cudart", "cusolver", "cusolver_dev", "npp", "npp_dev"
$CUDA_PACKAGES = "nvcc", "visual_studio_integration", "cublas", "cublas_dev", "cudart", "cusolver", "cusolver_dev", "npp", "npp_dev", "thrust"
$CUDA_PACKAGES.ForEach({ $CUDA_INSTALL_ARGS += " $($_)_$($CUDA_VER)" })
# Download and install CUDA
echo "Downloading CUDA installer from $CUDA_URL"
Expand Down Expand Up @@ -110,6 +110,7 @@ jobs:
if (${env:DEVELOPER_BUILD} -ne "OFF") {
${env:DEVELOPER_BUILD}="ON"
}
cmake --version
cmake -G "Visual Studio 16 2019" -A x64 `
-DDEVELOPER_BUILD="${env:DEVELOPER_BUILD}" `
-DCMAKE_SYSTEM_VERSION="10.0.19041.0" `
Expand Down Expand Up @@ -240,7 +241,7 @@ 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.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -250,6 +251,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'

steps:
- name: Checkout source code
Expand Down Expand Up @@ -328,7 +331,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
exclude:
Expand All @@ -338,6 +341,8 @@ jobs:
python_version: '3.9'
- is_main: false
python_version: '3.10'
- is_main: false
python_version: '3.11'

steps:
- name: Checkout source code
Expand Down
9 changes: 2 additions & 7 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,14 @@ tinyobjloader v1.0.0 MIT license
Tiny but powerful single file wavefront obj loader
https://github.com/syoyo/tinyobjloader
--------------------------------------------------------------------------------
pybind11 v2.6.2 BSD license
pybind11 v2.13.1 BSD license
Python binding for C++11
https://github.com/pybind/pybind11
--------------------------------------------------------------------------------
PoissonReco 12.0 BSD license
Poisson Surface Reconstruction
https://github.com/mkazhdan/PoissonRecon
--------------------------------------------------------------------------------
Parallel STL 20190522 Apache-2 license
An implementation of the C++ standard library algorithms with support for
execution policies
https://github.com/oneapi-src/oneDPL
--------------------------------------------------------------------------------
CUB 1.8.0 BSD license
A flexible library of cooperative threadblock primitives and other utilities for
CUDA kernel programming
Expand Down Expand Up @@ -113,7 +108,7 @@ As an alternative, you can modify 3rdparty/zeromq/zeromq_build.cmake to fetch
zeromq from our fork
https://github.com/isl-org/libzmq
--------------------------------------------------------------------------------
embree 3.13.0 Apache-2 license
embree 4.3.1 Apache-2 license
Embree is a collection of high-performance ray tracing kernels
https://github.com/embree/embree
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ set(ExternalProject_CMAKE_ARGS
-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
-DCMAKE_CUDA_COMPILER_LAUNCHER=${CMAKE_CUDA_COMPILER_LAUNCHER}
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
-DCMAKE_CUDA_FLAGS=${CMAKE_CUDA_FLAGS}
-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}
-DCMAKE_INSTALL_LIBDIR=${Open3D_INSTALL_LIB_DIR}
# Always build 3rd party code in Release mode. Ignored by multi-config
Expand Down
6 changes: 4 additions & 2 deletions 3rdparty/stdgpu/stdgpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ include(ExternalProject)
ExternalProject_Add(
ext_stdgpu
PREFIX stdgpu
URL https://github.com/stotko/stdgpu/archive/e10f6f3ccc9902d693af4380c3bcd188ec34a2e6.tar.gz
URL_HASH SHA256=7bb2733b099f7cedc86d2aee7830d128ac1222cfafa34cbaa4e818483c0a93f6
# Jun 20 2024. Later versions need CUDA 11.5 and an API update (stdgpu::pair)
URL https://github.com/stotko/stdgpu/archive/1b6a3319f1fbf180166e1bbc1d75f69ab622a0a0.tar.gz
URL_HASH SHA256=faa3bf9cbe49ef9cc09e2e07e60d10bbf3b896edb6089c920bebe0f850fd95e4
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/stdgpu"
UPDATE_COMMAND ""
CMAKE_ARGS
Expand All @@ -17,6 +18,7 @@ ExternalProject_Add(
-DSTDGPU_BUILD_SHARED_LIBS=OFF
-DSTDGPU_BUILD_EXAMPLES=OFF
-DSTDGPU_BUILD_TESTS=OFF
-DSTDGPU_BUILD_BENCHMARKS=OFF
-DSTDGPU_ENABLE_CONTRACT_CHECKS=OFF
-DTHRUST_INCLUDE_DIR=${CUDAToolkit_INCLUDE_DIRS}
${ExternalProject_CMAKE_ARGS_hidden}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- `TriangleMesh`'s `+=` operator appends UVs regardless of the presence of existing features (PR #6728)
- Fix build with fmt v10.2.0 (#6783)
- Fix segmentation fault (lambda reference capture) of VisualizerWithCustomAnimation::Play (PR #6804)
- Python 3.12 support
- Add O3DVisualizer API to enable collapse control of verts in the side panel (PR #6865)
- Split pybind declarations/definitions to avoid C++ types in Python docs (PR #6869)
- Fix minimal oriented bounding box of MeshBase derived classes and add new unit tests (PR #6898)
Expand Down
30 changes: 19 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,18 @@ cmake_language(EVAL CODE "cmake_language(DEFER CALL open3d_patch_findthreads_mod

# Build CUDA module by default if CUDA is available
if(BUILD_CUDA_MODULE)
if(BUILD_COMMON_CUDA_ARCHS)
if (CMAKE_CUDA_ARCHITECTURES)
message(STATUS "Building with user-provided architectures: ${CMAKE_CUDA_ARCHITECTURES}")
else()
# Suppress nvcc unsupported compiler error for MSVC 2022 with CUDA 11.7 to 12.4
# https://forums.developer.nvidia.com/t/problems-with-latest-vs2022-update/294150/12
if (MSVC AND MSVC_VERSION VERSION_LESS_EQUAL "1949")
# Set this before any CUDA checks
set(CMAKE_CUDA_FLAGS "--allow-unsupported-compiler" CACHE STRING "Additional flags for nvcc" FORCE)
message(WARNING "Using --allow-unsupported-compiler flag for nvcc with MSVC 2022. "
"Set $Env:NVCC_PREPEND_FLAGS='--allow-unsupported-compiler' if nvcc still fails.")
endif()
if (CMAKE_CUDA_ARCHITECTURES)
message(STATUS "Building with user-provided CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
else()
if(BUILD_COMMON_CUDA_ARCHS)
# Build with all supported architectures for previous 2 generations and
# M0 (minor=0) architectures for previous generations (including
# deprecated). Note that cubin for M0 runs on GPUs with architecture Mx.
Expand All @@ -410,14 +418,14 @@ if(BUILD_CUDA_MODULE)
set(CMAKE_CUDA_ARCHITECTURES 30-real 50-real 60-real 70-real 75) # Kepler, Maxwell, Pascal, Turing
endif()
message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
endif()
else()
execute_process(COMMAND nvidia-smi RESULT_VARIABLE NVIDIA_CHECK OUTPUT_QUIET)
if (NVIDIA_CHECK EQUAL 0)
message(STATUS "Building with native CUDA architecture.")
set(CMAKE_CUDA_ARCHITECTURES native)
else()
message(WARNING "No CUDA GPU detected. Building with CMake default CUDA architecture.")
execute_process(COMMAND nvidia-smi RESULT_VARIABLE NVIDIA_CHECK OUTPUT_QUIET)
if (NVIDIA_CHECK EQUAL 0)
message(STATUS "Building with native CUDA architecture.")
set(CMAKE_CUDA_ARCHITECTURES native)
else()
message(WARNING "No CUDA GPU detected. Building with CMake default CUDA architecture.")
endif()
endif()
endif()
enable_language(CUDA)
Expand Down
3 changes: 2 additions & 1 deletion cpp/open3d/t/geometry/RaycastingScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ typedef Eigen::Vector3f Vec3f;

// Error function called by embree.
void ErrorFunction(void* userPtr, enum RTCError error, const char* str) {
open3d::utility::LogError("embree error: {} {}", error, str);
open3d::utility::LogError("Embree error: {} {}", rtcGetErrorString(error),
str);
}

// Checks the last dim, ensures that the number of dims is >= min_ndim, checks
Expand Down
2 changes: 1 addition & 1 deletion cpp/open3d/t/io/file_format/FileASSIMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ bool WriteTriangleMeshUsingASSIMP(const std::string& filename,
if (mesh.HasTriangleColors()) {
utility::LogWarning(
"Exporting triangle colors is not supported. Please convert to "
"vertex colors or export to a format that supporst it.");
"vertex colors or export to a format that supports it.");
}

Assimp::Exporter exporter;
Expand Down
6 changes: 3 additions & 3 deletions cpp/pybind/core/tensor_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ Tensor PyArrayToTensor(py::array array, bool inplace) {
Dtype dtype = pybind_utils::ArrayFormatToDtype(info.format, info.itemsize);
Device device("CPU:0");

array.inc_ref();
std::function<void(void*)> deleter = [array](void*) -> void {
auto shared_array = std::make_shared<py::array>(array);
std::function<void(void*)> deleter = [shared_array](void*) mutable -> void {
py::gil_scoped_acquire acquire;
array.dec_ref();
shared_array.reset();
};
auto blob = std::make_shared<Blob>(device, info.ptr, deleter);
Tensor t_inplace(shape, strides, info.ptr, dtype, blob);
Expand Down
Loading
Loading