Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Main
- Allow bundling CUDA-DLLs into the pip-package on Windows with BUNDLE_CUDA_SHARED_LIBS.
- Corrected documentation for Link Open3D in C++ projects (broken links).
- Fix DLLs not being found in Python-package. Also prevent PATH from being searched for DLLs, except CUDA (PR #7108)
- Fix MSAA sample count not being copied when FilamentView is copied
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ option(BUILD_AZURE_KINECT "Build support for Azure Kinect sensor" OFF
option(BUILD_TENSORFLOW_OPS "Build ops for TensorFlow" OFF)
option(BUILD_PYTORCH_OPS "Build ops for PyTorch" OFF)
option(BUNDLE_OPEN3D_ML "Includes the Open3D-ML repo in the wheel" OFF)
option(BUNDLE_CUDA_SHARED_LIBS "Includes CUDA-DLLs in the wheel (win only)" OFF)

# Release build options
option(DEVELOPER_BUILD "Add +commit_hash to the project version number" ON )
Expand Down
9 changes: 9 additions & 0 deletions cpp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ install_name_tool -change $libomp_library @rpath/$(basename $libomp_library) \
COMMAND bash update_pybind_libomp.sh
COMMENT "Updating pybind to use packaged libomp")
endif()
if (WIN32 AND BUILD_CUDA_MODULE AND BUNDLE_CUDA_SHARED_LIBS)
# Just bundle all DLLs from CUDA to avoid having to update
# an explicit listing of required DLLs.
# Only bundling required DLLs would decrease the package size,
# but not by much, as cublas, cusparse and cusolver alone
# need about 1GB.
file(GLOB CUDA_DLLS "${CUDAToolkit_BIN_DIR}/*.dll")
list(APPEND PYTHON_EXTRA_LIBRARIES ${CUDA_DLLS})
endif()

# Use `make python-package` to create the python package in the build directory
# The python package will be created at PYTHON_PACKAGE_DST_DIR. It contains:
Expand Down
4 changes: 3 additions & 1 deletion python/open3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@
ImportWarning,
)
try:
if sys.platform == "win32" and sys.version_info >= (3, 8):
if sys.platform == "win32" and sys.version_info >= (3, 8) and not _build_config["BUNDLE_CUDA_SHARED_LIBS"]:
# Since Python 3.8, the PATH environment variable is not used to find DLLs anymore.
# To allow Windows users to use Open3D with CUDA without running into dependency-problems,
# look for the CUDA bin directory in PATH and explicitly add it to the DLL search path.
# Only do this if the CUDA shared libraries are not bundled with Open3D to prevent conflicts
# beteween bundled and system libraries.
cuda_bin_path = None
for path in os.environ['PATH'].split(';'):
# search heuristic: look for a path containing "cuda" and "bin" in this order.
Expand Down
Loading