Skip to content

Commit

Permalink
Merge branch 'main' into nicolaloi/fix-custom-trajectory
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey authored Jun 14, 2024
2 parents 7843ece + 0bdedd3 commit 7dc5ce7
Show file tree
Hide file tree
Showing 33 changed files with 509 additions and 23 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/clean-gcloud-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
# happens, run this workflow manually to clean up the login profiles.

name: Clean GCloud Profiles
permissions:
contents: read

on:
workflow_dispatch:
# push:
# branches:
# - main
# pull_request:
# types: [opened, reopened, synchronize]

env:
GCE_GPU_CI_SA: ${{ secrets.GCE_GPU_CI_SA }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Documentation
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: MacOS
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Style Check
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu-cuda.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Ubuntu CUDA
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu-openblas.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Ubuntu OpenBLAS
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu-sycl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Ubuntu SYCL
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Ubuntu Wheel
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -102,7 +105,7 @@ jobs:
run: |
gsutil cp ${GITHUB_WORKSPACE}/${{ env.CCACHE_TAR_NAME }}.tar.gz gs://open3d-ci-cache/
- name: Update devel release
# if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Ubuntu
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vtk_packages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: VTK Packages
permissions:
contents: write

on:
# pull_request:
# branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/webrtc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: WebRTC
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Windows
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
4 changes: 3 additions & 1 deletion 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,9 @@ if(OPEN3D_USE_ONEAPI_PACKAGES)
TARGETS TBB::tbb
)
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM Open3D::3rdparty_tbb)

target_compile_definitions(3rdparty_tbb INTERFACE OPEN3D_USE_ONEAPI_PACKAGES=1)
target_compile_definitions(3rdparty_tbb INTERFACE _PSTL_UDR_PRESENT=0)
target_compile_definitions(3rdparty_tbb INTERFACE _PSTL_UDS_PRESENT=0)
# 2. oneDPL
# /opt/intel/oneapi/dpl/latest/lib/cmake/oneDPL
open3d_find_package_3rdparty_library(3rdparty_onedpl
Expand Down
20 changes: 12 additions & 8 deletions 3rdparty/fmt/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ include(ExternalProject)

set(FMT_LIB_NAME fmt)

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
"f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78")
if (MSVC AND BUILD_CUDA_MODULE)
if (MSVC_VERSION GREATER_EQUAL 1930) # v143
set(FMT_VER "10.1.1")
set(FMT_SHA256
"78b8c0a72b1c35e4443a7e308df52498252d1cefc2b08c9a97bc9ee6cfe61f8b")
else()
set(FMT_VER "6.0.0")
set(FMT_SHA256
"f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78")
endif()
else()
set(FMT_VER "9.0.0")
set(FMT_VER "10.2.1")
set(FMT_SHA256
"9a1e0e9e843a356d65c7604e2c8bf9402b50fe294c355de0095ebd42fb9bd2c5")
"1250e4cc58bf06ee631567523f48848dc4596133e163f02615c97f78bab6c811")
endif()

ExternalProject_Add(
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
- Fix KDTreeFlann possibly using a dangling pointer instead of internal storage and simplified its members (PR #6734)
- Fix RANSAC early stop if no inliers in a specific iteration (PR #6789)
- Fix segmentation fault (infinite recursion) of DetectPlanarPatches if multiple points have same coordinates (PR #6794)
- Fix build with fmt v10.2.0 (#6783)
- Fix segmentation fault (lambda reference capture) of VisualizerWithCustomAnimation::Play (PR #6804)

## 0.13
Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.

## Reporting a Vulnerability
Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).
52 changes: 52 additions & 0 deletions cpp/open3d/core/DLPack.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,56 @@ typedef struct DLManagedTensor {
#ifdef __cplusplus
} // DLPACK_EXTERN_C
#endif

#include <fmt/core.h>
#include <fmt/format.h>

namespace fmt {

template <>
struct formatter<DLDeviceType> {
template <typename FormatContext>
auto format(const DLDeviceType& c, FormatContext& ctx) const
-> decltype(ctx.out()) {
const char* text = nullptr;
switch (c) {
case kDLCPU:
text = "kDLCPU";
break;
case kDLGPU:
text = "kDLGPU";
break;
case kDLCPUPinned:
text = "kDLCPUPinned";
break;
case kDLOpenCL:
text = "kDLOpenCL";
break;
case kDLVulkan:
text = "kDLVulkan";
break;
case kDLMetal:
text = "kDLMetal";
break;
case kDLVPI:
text = "kDLVPI";
break;
case kDLROCM:
text = "kDLROCM";
break;
case kDLExtDev:
text = "kDLExtDev";
break;
}
return format_to(ctx.out(), text);
}

template <typename ParseContext>
constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
return ctx.begin();
}
};

} // namespace fmt

#endif // DLPACK_DLPACK_H_
103 changes: 103 additions & 0 deletions cpp/open3d/core/linalg/LinalgHeadersCUDA.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,107 @@
#include <cublas_v2.h>
#include <cusolverDn.h>
#include <cusolver_common.h>
#include <fmt/core.h>
#include <fmt/format.h>

namespace fmt {

template <>
struct formatter<cusolverStatus_t> {
template <typename FormatContext>
auto format(const cusolverStatus_t& c, FormatContext& ctx) const
-> decltype(ctx.out()) {
const char* text = nullptr;
switch (c) {
case CUSOLVER_STATUS_SUCCESS:
text = "CUSOLVER_STATUS_SUCCESS";
break;
case CUSOLVER_STATUS_NOT_INITIALIZED:
text = "CUSOLVER_STATUS_NOT_INITIALIZED";
break;
case CUSOLVER_STATUS_ALLOC_FAILED:
text = "CUSOLVER_STATUS_ALLOC_FAILED";
break;
case CUSOLVER_STATUS_INVALID_VALUE:
text = "CUSOLVER_STATUS_INVALID_VALUE";
break;
case CUSOLVER_STATUS_ARCH_MISMATCH:
text = "CUSOLVER_STATUS_ARCH_MISMATCH";
break;
case CUSOLVER_STATUS_MAPPING_ERROR:
text = "CUSOLVER_STATUS_MAPPING_ERROR";
break;
case CUSOLVER_STATUS_EXECUTION_FAILED:
text = "CUSOLVER_STATUS_EXECUTION_FAILED";
break;
case CUSOLVER_STATUS_INTERNAL_ERROR:
text = "CUSOLVER_STATUS_INTERNAL_ERROR";
break;
case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED:
text = "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED";
break;
case CUSOLVER_STATUS_NOT_SUPPORTED:
text = "CUSOLVER_STATUS_NOT_SUPPORTED";
break;
case CUSOLVER_STATUS_ZERO_PIVOT:
text = "CUSOLVER_STATUS_ZERO_PIVOT";
break;
case CUSOLVER_STATUS_INVALID_LICENSE:
text = "CUSOLVER_STATUS_INVALID_LICENSE";
break;
case CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED:
text = "CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED";
break;
case CUSOLVER_STATUS_IRS_PARAMS_INVALID:
text = "CUSOLVER_STATUS_IRS_PARAMS_INVALID";
break;
case CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC:
text = "CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC";
break;
case CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE:
text = "CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE";
break;
case CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER:
text = "CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER";
break;
case CUSOLVER_STATUS_IRS_INTERNAL_ERROR:
text = "CUSOLVER_STATUS_IRS_INTERNAL_ERROR";
break;
case CUSOLVER_STATUS_IRS_NOT_SUPPORTED:
text = "CUSOLVER_STATUS_IRS_NOT_SUPPORTED";
break;
case CUSOLVER_STATUS_IRS_OUT_OF_RANGE:
text = "CUSOLVER_STATUS_IRS_OUT_OF_RANGE";
break;
case CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES:
text = "CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_"
"GMRES";
break;
case CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED:
text = "CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED";
break;
case CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED:
text = "CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED";
break;
case CUSOLVER_STATUS_IRS_MATRIX_SINGULAR:
text = "CUSOLVER_STATUS_IRS_MATRIX_SINGULAR";
break;
case CUSOLVER_STATUS_INVALID_WORKSPACE:
text = "CUSOLVER_STATUS_INVALID_WORKSPACE";
break;
default:
text = "CUSOLVER_STATUS_UNKNOWN";
break;
}
return format_to(ctx.out(), text);
}

template <typename ParseContext>
constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
return ctx.begin();
}
};

} // namespace fmt

#endif
19 changes: 19 additions & 0 deletions cpp/open3d/geometry/LineSetFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,25 @@ std::shared_ptr<LineSet> LineSet::CreateCameraVisualization(
lines->lines_.push_back({4, 1});
lines->PaintUniformColor({0.0f, 0.0f, 1.0f});

// Add XYZ axes
lines->points_.push_back(
mult(m, Eigen::Vector3d{intrinsic(0, 0) * scale, 0.0, 0.0}));
lines->points_.push_back(
mult(m, Eigen::Vector3d{0.0, intrinsic(1, 1) * scale, 0.0}));
lines->points_.push_back(
mult(m, Eigen::Vector3d{intrinsic(0, 2) * scale,
intrinsic(1, 2) * scale, scale}));

// Add lines for the axes
lines->lines_.push_back({0, 5}); // X axis (red)
lines->lines_.push_back({0, 6}); // Y axis (green)
lines->lines_.push_back({0, 7}); // Z axis (blue)

// Set colors for the axes
lines->colors_.push_back({1.0f, 0.0f, 0.0f}); // Red
lines->colors_.push_back({0.0f, 1.0f, 0.0f}); // Green
lines->colors_.push_back({0.0f, 0.0f, 1.0f}); // Blue

return lines;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/open3d/io/IJsonConvertibleIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool WriteIJsonConvertibleToJSONString(std::string &json_string,
[&str](const std::pair<ENUM_TYPE, std::string> &es_pair) \
-> bool { return es_pair.second == str; }); \
e = ((it != std::end(m)) ? it : std::begin(m))->first; \
utility::LogDebug("{} -> {}", str, e); \
utility::LogDebug("{} -> {}", str, enum_to_string(e)); \
}

} // namespace io
Expand Down
Loading

0 comments on commit 7dc5ce7

Please sign in to comment.