Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminum authored Aug 29, 2023
2 parents 557ccd4 + 0f12276 commit a21b6b5
Show file tree
Hide file tree
Showing 118 changed files with 1,695 additions and 841 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
test-wheel-cpu:
name: Test wheel CPU
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [build-wheel]
strategy:
fail-fast: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ jobs:
# no need to run on Windows
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
needs: [build-wheel, windows]
# temp workaround for Windows CUDA Debug CI out of space. Still update docs.
# needs: [build-wheel, windows]
needs: [build-wheel]
steps:
- name: GCloud CLI auth
uses: google-github-actions/auth@v1
Expand Down
21 changes: 21 additions & 0 deletions 3rdparty/cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Try to use pre-installed config
find_package(TBB CONFIG)
if(TARGET TBB::tbb)
set(TBB_FOUND TRUE)
else()
message(STATUS "Target TBB::tbb not defined, falling back to manual detection")
find_path(TBB_INCLUDE_DIR tbb/tbb.h)
find_library(TBB_LIBRARY tbb)
if(TBB_INCLUDE_DIR AND TBB_LIBRARY)
message(STATUS "TBB found: ${TBB_LIBRARY}")
add_library(TBB::tbb UNKNOWN IMPORTED)
set_target_properties(TBB::tbb PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIR}"
IMPORTED_LOCATION "${TBB_LIBRARY}"
)
set(TBB_FOUND TRUE)
else()
set(TBB_FOUND FALSE)
endif()
endif()

101 changes: 78 additions & 23 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ endfunction()
# If <pkg> also defines targets, use them instead and pass them via TARGETS option.
#
function(open3d_find_package_3rdparty_library name)
cmake_parse_arguments(arg "PUBLIC;HEADER;REQUIRED;QUIET" "PACKAGE;PACKAGE_VERSION_VAR" "TARGETS;INCLUDE_DIRS;LIBRARIES" ${ARGN})
cmake_parse_arguments(arg "PUBLIC;HEADER;REQUIRED;QUIET" "PACKAGE;VERSION;PACKAGE_VERSION_VAR" "TARGETS;INCLUDE_DIRS;LIBRARIES" ${ARGN})
if(arg_UNPARSED_ARGUMENTS)
message(STATUS "Unparsed: ${arg_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Invalid syntax: open3d_find_package_3rdparty_library(${name} ${ARGN})")
Expand All @@ -281,6 +281,9 @@ function(open3d_find_package_3rdparty_library name)
set(arg_PACKAGE_VERSION_VAR "${arg_PACKAGE}_VERSION")
endif()
set(find_package_args "")
if(arg_VERSION)
list(APPEND find_package_args "${arg_VERSION}")
endif()
if(arg_REQUIRED)
list(APPEND find_package_args "REQUIRED")
endif()
Expand Down Expand Up @@ -539,11 +542,26 @@ endif()

# cutlass
if(BUILD_CUDA_MODULE)
include(${Open3D_3RDPARTY_DIR}/cutlass/cutlass.cmake)
open3d_import_3rdparty_library(3rdparty_cutlass
INCLUDE_DIRS ${CUTLASS_INCLUDE_DIRS}
DEPENDS ext_cutlass
)
if(USE_SYSTEM_CUTLASS)
find_path(3rdparty_cutlass_INCLUDE_DIR NAMES cutlass/cutlass.h)
if(3rdparty_cutlass_INCLUDE_DIR)
add_library(3rdparty_cutlass INTERFACE)
target_include_directories(3rdparty_cutlass INTERFACE ${3rdparty_cutlass_INCLUDE_DIR})
add_library(Open3D::3rdparty_cutlass ALIAS 3rdparty_cutlass)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS 3rdparty_cutlass EXPORT ${PROJECT_NAME}Targets)
endif()
else()
set(USE_SYSTEM_CUTLASS OFF)
endif()
endif()
if(NOT USE_SYSTEM_CUTLASS)
include(${Open3D_3RDPARTY_DIR}/cutlass/cutlass.cmake)
open3d_import_3rdparty_library(3rdparty_cutlass
INCLUDE_DIRS ${CUTLASS_INCLUDE_DIRS}
DEPENDS ext_cutlass
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_cutlass)
endif()

Expand Down Expand Up @@ -581,6 +599,7 @@ endif()
if(USE_SYSTEM_NANOFLANN)
open3d_find_package_3rdparty_library(3rdparty_nanoflann
PACKAGE nanoflann
VERSION 1.5.0
TARGETS nanoflann::nanoflann
)
if(NOT 3rdparty_nanoflann_FOUND)
Expand Down Expand Up @@ -1109,6 +1128,14 @@ open3d_import_3rdparty_library(3rdparty_poisson
)
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_poisson)

# Minizip
if(WITH_MINIZIP)
open3d_pkg_config_3rdparty_library(3rdparty_minizip
SEARCH_ARGS minizip
)
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM Open3D::3rdparty_minizip)
endif()

# Googletest
if (BUILD_UNIT_TESTS)
if(USE_SYSTEM_GOOGLETEST)
Expand Down Expand Up @@ -1429,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 Expand Up @@ -1826,25 +1859,47 @@ endif ()

# Stdgpu
if (BUILD_CUDA_MODULE)
include(${Open3D_3RDPARTY_DIR}/stdgpu/stdgpu.cmake)
open3d_import_3rdparty_library(3rdparty_stdgpu
INCLUDE_DIRS ${STDGPU_INCLUDE_DIRS}
LIB_DIR ${STDGPU_LIB_DIR}
LIBRARIES ${STDGPU_LIBRARIES}
DEPENDS ext_stdgpu
)
if(USE_SYSTEM_STDGPU)
open3d_find_package_3rdparty_library(3rdparty_stdgpu
PACKAGE stdgpu
TARGETS stdgpu::stdgpu
)
if(NOT 3rdparty_stdgpu_FOUND)
set(USE_SYSTEM_STDGPU OFF)
endif()
endif()
if(NOT USE_SYSTEM_STDGPU)
include(${Open3D_3RDPARTY_DIR}/stdgpu/stdgpu.cmake)
open3d_import_3rdparty_library(3rdparty_stdgpu
INCLUDE_DIRS ${STDGPU_INCLUDE_DIRS}
LIB_DIR ${STDGPU_LIB_DIR}
LIBRARIES ${STDGPU_LIBRARIES}
DEPENDS ext_stdgpu
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_stdgpu)
endif ()

# embree
include(${Open3D_3RDPARTY_DIR}/embree/embree.cmake)
open3d_import_3rdparty_library(3rdparty_embree
HIDDEN
INCLUDE_DIRS ${EMBREE_INCLUDE_DIRS}
LIB_DIR ${EMBREE_LIB_DIR}
LIBRARIES ${EMBREE_LIBRARIES}
DEPENDS ext_embree
)
if(USE_SYSTEM_EMBREE)
open3d_find_package_3rdparty_library(3rdparty_embree
PACKAGE embree
TARGETS embree
)
if(NOT 3rdparty_embree_FOUND)
set(USE_SYSTEM_EMBREE OFF)
endif()
endif()
if(NOT USE_SYSTEM_EMBREE)
include(${Open3D_3RDPARTY_DIR}/embree/embree.cmake)
open3d_import_3rdparty_library(3rdparty_embree
HIDDEN
INCLUDE_DIRS ${EMBREE_INCLUDE_DIRS}
LIB_DIR ${EMBREE_LIB_DIR}
LIBRARIES ${EMBREE_LIBRARIES}
DEPENDS ext_embree
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_embree)

# WebRTC
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/nanoflann/nanoflann.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include(ExternalProject)
ExternalProject_Add(
ext_nanoflann
PREFIX nanoflann
URL https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.3.2.tar.gz
URL_HASH SHA256=e100b5fc8d72e9426a80312d852a62c05ddefd23f17cbb22ccd8b458b11d0bea
URL https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.5.0.tar.gz
URL_HASH SHA256=89aecfef1a956ccba7e40f24561846d064f309bc547cc184af7f4426e42f8e65
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/nanoflann"
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## Master

* Fix tensor based TSDF integration example.
* Use GLIBCXX_USE_CXX11_ABI=ON by default
* Python 3.9 support. Tensorflow bump 2.4.1 -> 2.5.0. PyTorch bump 1.7.1 -> 1.8.1 (LTS)
* Fix undefined names: docstr and VisibleDeprecationWarning (PR #3844)
* Corrected documentation for Tensor based PointClound, LineSet, TriangleMesh (PR #4685)
* Corrected documentation for KDTree (typo in Notebook) (PR #4744)
* Corrected documentation for visualisation tutorial
* Remove `setuptools` and `wheel` from requirements for end users (PR #5020)
* Fix various typos (PR #5070)
* Exposed more functionality in SLAM and odometry pipelines
Expand All @@ -13,6 +16,7 @@
* Fix Python bindings for CUDA device synchronization, voxel grid saving (PR #5425)
* Support msgpack versions without cmake
* Support multi-threading in the RayCastingScene function to commit scene (PR #6051).
* Fix some bad triangle generation in TriangleMesh::SimplifyQuadricDecimation

## 0.13

Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ else()
option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" ON )
endif()
option(BUILD_SYCL_MODULE "Build SYCL module with Intel oneAPI" OFF)
if(BUILD_SYCL_MODULE)
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" ON )
else()
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" OFF)
endif()
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" ON )
option(ENABLE_SYCL_UNIFIED_SHARED_MEMORY "Enable SYCL unified shared memory" OFF)
if(BUILD_GUI AND (WIN32 OR UNIX AND NOT LINUX_AARCH64 AND NOT APPLE_AARCH64))
option(BUILD_WEBRTC "Build WebRTC visualizer" ON )
Expand All @@ -91,7 +87,9 @@ else()
endif()
option(USE_SYSTEM_ASSIMP "Use system pre-installed assimp" OFF)
option(USE_SYSTEM_CURL "Use system pre-installed curl" OFF)
option(USE_SYSTEM_CUTLASS "Use system pre-installed cutlass" OFF)
option(USE_SYSTEM_EIGEN3 "Use system pre-installed eigen3" OFF)
option(USE_SYSTEM_EMBREE "Use system pre-installed Embree" OFF)
option(USE_SYSTEM_FILAMENT "Use system pre-installed filament" OFF)
option(USE_SYSTEM_FMT "Use system pre-installed fmt" OFF)
option(USE_SYSTEM_GLEW "Use system pre-installed glew" OFF)
Expand All @@ -107,6 +105,7 @@ option(USE_SYSTEM_OPENSSL "Use system pre-installed OpenSSL" OFF
option(USE_SYSTEM_PNG "Use system pre-installed png" OFF)
option(USE_SYSTEM_PYBIND11 "Use system pre-installed pybind11" OFF)
option(USE_SYSTEM_QHULLCPP "Use system pre-installed qhullcpp" OFF)
option(USE_SYSTEM_STDGPU "Use system pre-installed stdgpu" OFF)
option(USE_SYSTEM_TBB "Use system pre-installed TBB" OFF)
option(USE_SYSTEM_TINYGLTF "Use system pre-installed tinygltf" OFF)
option(USE_SYSTEM_TINYOBJLOADER "Use system pre-installed tinyobjloader" OFF)
Expand All @@ -121,6 +120,7 @@ else()
endif()

option(PREFER_OSX_HOMEBREW "Prefer Homebrew libs over frameworks" ON )
option(WITH_MINIZIP "Enable MiniZIP" OFF)

# Sensor options
option(BUILD_LIBREALSENSE "Build support for Intel RealSense camera" OFF)
Expand Down
2 changes: 1 addition & 1 deletion cpp/apps/OfflineReconstruction/LegacyReconstructionUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ class ReconstructionPipeline {
Eigen::Matrix6d info;
const size_t num_scale = voxel_size.size();
for (size_t i = 0; i < num_scale; i++) {
const double max_dis = config_["voxel_szie"].asDouble() * 1.4;
const double max_dis = config_["voxel_size"].asDouble() * 1.4;
const auto src_down = src.VoxelDownSample(voxel_size[i]);
const auto dst_down = dst.VoxelDownSample(voxel_size[i]);
const pipelines::registration::ICPConvergenceCriteria criteria(
Expand Down
50 changes: 28 additions & 22 deletions cpp/benchmarks/t/geometry/PointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ void LegacyVoxelDownSample(benchmark::State& state, float voxel_size) {
void VoxelDownSample(benchmark::State& state,
const core::Device& device,
float voxel_size,
const core::HashBackendType& backend) {
const std::string& reduction) {
t::geometry::PointCloud pcd;
// t::io::CreatePointCloudFromFile lacks support of remove_inf_points and
// remove_nan_points
t::io::ReadPointCloud(path, pcd, {"auto", false, false, false});
pcd = pcd.To(device);

// Warm up.
pcd.VoxelDownSample(voxel_size, backend);
pcd.VoxelDownSample(voxel_size, reduction);

for (auto _ : state) {
pcd.VoxelDownSample(voxel_size, backend);
pcd.VoxelDownSample(voxel_size, reduction);
core::cuda::Synchronize(device);
}
}
Expand Down Expand Up @@ -387,28 +387,34 @@ BENCHMARK_CAPTURE(ToLegacyPointCloud, CUDA, core::Device("CUDA:0"))
->Unit(benchmark::kMillisecond);
#endif

#define ENUM_VOXELSIZE(DEVICE, BACKEND) \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_01, DEVICE, 0.01, BACKEND) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_02, DEVICE, 0.08, BACKEND) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_04, DEVICE, 0.04, BACKEND) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_08, DEVICE, 0.08, BACKEND) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_16, DEVICE, 0.16, BACKEND) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, BACKEND##_0_32, DEVICE, 0.32, BACKEND) \
#define ENUM_VOXELSIZE(DEVICE, REDUCTION) \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_01, DEVICE, 0.01, \
REDUCTION) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_02, DEVICE, 0.08, \
REDUCTION) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_04, DEVICE, 0.04, \
REDUCTION) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_08, DEVICE, 0.08, \
REDUCTION) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_16, DEVICE, 0.16, \
REDUCTION) \
->Unit(benchmark::kMillisecond); \
BENCHMARK_CAPTURE(VoxelDownSample, REDUCTION##_0_32, DEVICE, 0.32, \
REDUCTION) \
->Unit(benchmark::kMillisecond);

const std::string kReductionMean = "mean";
#ifdef BUILD_CUDA_MODULE
#define ENUM_VOXELDOWNSAMPLE_BACKEND() \
ENUM_VOXELSIZE(core::Device("CPU:0"), core::HashBackendType::TBB) \
ENUM_VOXELSIZE(core::Device("CUDA:0"), core::HashBackendType::Slab) \
ENUM_VOXELSIZE(core::Device("CUDA:0"), core::HashBackendType::StdGPU)
#define ENUM_VOXELDOWNSAMPLE_REDUCTION() \
ENUM_VOXELSIZE(core::Device("CPU:0"), kReductionMean) \
ENUM_VOXELSIZE(core::Device("CUDA:0"), kReductionMean)
#else
#define ENUM_VOXELDOWNSAMPLE_BACKEND() \
ENUM_VOXELSIZE(core::Device("CPU:0"), core::HashBackendType::TBB)
#define ENUM_VOXELDOWNSAMPLE_REDUCTION() \
ENUM_VOXELSIZE(core::Device("CPU:0"), kReductionMean)
#endif

BENCHMARK_CAPTURE(LegacyVoxelDownSample, Legacy_0_01, 0.01)
Expand All @@ -423,7 +429,7 @@ BENCHMARK_CAPTURE(LegacyVoxelDownSample, Legacy_0_16, 0.16)
->Unit(benchmark::kMillisecond);
BENCHMARK_CAPTURE(LegacyVoxelDownSample, Legacy_0_32, 0.32)
->Unit(benchmark::kMillisecond);
ENUM_VOXELDOWNSAMPLE_BACKEND()
ENUM_VOXELDOWNSAMPLE_REDUCTION()

BENCHMARK_CAPTURE(LegacyUniformDownSample, Legacy_2, 2)
->Unit(benchmark::kMillisecond);
Expand Down
3 changes: 3 additions & 0 deletions cpp/open3d/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ target_sources(core PRIVATE
kernel/BinaryEWCPU.cpp
kernel/IndexGetSet.cpp
kernel/IndexGetSetCPU.cpp
kernel/IndexReduction.cpp
kernel/IndexReductionCPU.cpp
kernel/Kernel.cpp
kernel/NonZero.cpp
kernel/NonZeroCPU.cpp
Expand Down Expand Up @@ -90,6 +92,7 @@ if (BUILD_CUDA_MODULE)
kernel/ArangeCUDA.cu
kernel/BinaryEWCUDA.cu
kernel/IndexGetSetCUDA.cu
kernel/IndexReductionCUDA.cu
kernel/NonZeroCUDA.cu
kernel/ReductionCUDA.cu
kernel/UnaryEWCUDA.cu
Expand Down
Loading

0 comments on commit a21b6b5

Please sign in to comment.