Skip to content

Optionally include CUDA DLLs in open3d-package #7306

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

Closed
wants to merge 1 commit into from

Conversation

fegorsch
Copy link
Contributor

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

In order to have a self-contained Python package with GPU-support on Windows, allow bundling the CUDA DLLs with open3d. This is especially useful when deploying open3d to non-developer machines where you cannot assume that CUDA is installed. It also is a step towards an official Python package with CUDA-support for Windows, which would save the effort of building yourself.

Checklist:

  • [ x] I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • [ x] This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • [ x] I will follow up and update the code if CI fails.
  • [ x] For fork PRs, I have selected Allow edits from maintainers.

Description

Added CMake variable BUNDLE_CUDA_SHARED_LIBS, which causes all DLLs from the build system's CUDA-installation to be included in the wheel. Only works on Windows and only if BUILD_CUDA_MODULE is on.

In order to have a self-contained Python package with GPU-support on
Windows, allow bundling the CUDA DLLs with open3d. This is useful when
deploying open3d to systems where you cannot assume having CUDA toolkit
installed.
@fegorsch
Copy link
Contributor Author

Found that CUDA can also be installed via wheels available on pypi. Perhaps defining those as requirements is a better way of solving this, e.g. pytorch, Jax and tensorflow seem to resolve their CUDA-dependency this way as described here. I'll look into that and open a new PR.

@fegorsch fegorsch closed this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants