Conversation
…ackaging Enable BUNDLE_OPEN3D_ML automatically when PyTorch or TensorFlow ops are built, ship Open3D-ML pip deps as extras_require[ml], and validate imports via require_ml_extra. Bundle Filament LLVM libc++ on Linux GUI wheels with a small ldd helper; refresh CI/Docker for Open3D-ML main, CUDA 12.6+ arch defaults, and local style --changed-only.
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces Open3D wheel size by optionalizing ML dependencies and narrowing release CUDA architectures.
Changes:
- Adds the
mlpackage extra and dependency checks. - Updates CUDA targets, CI dependencies, and Open3D-ML checkout behavior.
- Bundles Linux GUI runtime libraries and adds changed-file style checking.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Automates ML bundling and revises CUDA targets. |
cmake/Open3DPrintConfigurationSummary.cmake |
Reports CUDA architecture settings. |
cpp/pybind/CMakeLists.txt |
Revises wheel runtime-library handling. |
cpp/pybind/make_python_package.cmake |
Packages ML requirements and Linux runtimes. |
cpp/pybind/package_linux_wheel_runtime.sh |
Copies required LLVM runtime libraries. |
python/setup.py |
Exposes ML dependencies as an extra. |
python/open3d/_optional_deps.py |
Validates optional ML dependencies. |
python/open3d/ml/configs.py |
Adds ML dependency validation. |
python/open3d/ml/datasets.py |
Adds ML dependency validation. |
python/open3d/ml/utils.py |
Adds ML dependency validation. |
python/open3d/ml/vis.py |
Adds ML dependency validation. |
util/ci_utils.sh |
Aligns runtime dependencies and CUDA architectures. |
util/check_style.py |
Adds changed-files-only formatting. |
docker/Dockerfile.ci |
Updates ML checkout and dependencies. |
3rdparty/README_SYCL.md |
Documents SYCL runtime installation. |
.github/workflows/windows.yml |
Uses Open3D-ML’s default branch. |
.github/workflows/ubuntu.yml |
Revises the documentation ML checkout. |
.github/workflows/ubuntu-wheel.yml |
Uses Open3D-ML’s default branch. |
.github/workflows/macos.yml |
Uses Open3D-ML’s default branch. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| from open3d._optional_deps import require_ml_extra | ||
|
|
||
| if _build_config['BUNDLE_OPEN3D_ML']: | ||
| require_ml_extra() |
| if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.8") | ||
| if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "12.6") | ||
| # CUDA 12.x release wheels: drop Turing (75); 90-real SASS + 90 PTX for forward compatibility. | ||
| set(CMAKE_CUDA_ARCHITECTURES 80-real 86-real 89-real 90-real 90) |
Comment on lines
+42
to
+44
| file(GLOB _libopen3d_probe LIST_DIRECTORIES false | ||
| "${PYTHON_PACKAGE_DST_DIR}/open3d/libOpen3D.so.*") | ||
| list(GET _libopen3d_probe 0 _libopen3d_probe) |
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: isl-org/Open3D-ML | ||
| path: /tmp/Open3D-ML |
| python_requires=">=3.10", | ||
| include_package_data=True, | ||
| install_requires=install_requires, | ||
| extras_require=extras_require, |
Make BUNDLE_OPEN3D_ML an option again, defaulting to ON only when ML ops are built and OPEN3D_ML_ROOT resolves, so local builds can opt out and CI jobs without an Open3D-ML checkout configure instead of erroring out. Windows wheels now bundle Open3D-ML too. Import the Open3D-ML backed submodules of open3d.ml, open3d.ml.torch and open3d.ml.tf lazily and gate them on require_ml_extra(), so the ops and layers stay usable with a core-only install and a missing dependency reports how to install the ml extra. Wheel tests install that extra. Keep Turing usable after dropping its SASS by emitting compute_75 PTX, which also needs a -virtual case when translating architectures for PyTorch. Fall back to the pybind extension when probing for libc++ in static builds, where libOpen3D is not packaged. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Motivation and Context
Total open3d wheel install size (blank virtual env): 1.41 GB. Most of the size comes from ML dependencies and CUDA SASS / PTX per-architecture binary code.
Separating ml dependencies saves ~335MB of installed disk space.
Analysis of
open3d-0.19.0-cp312-manylinux_2_35_x86_64.whlvsopen3d_cpufrom the same pipeline:open3d(CUDA) wheelopen3d_cpuwheellibOpen3D.so(CUDA wheel)libOpen3D.so(CPU wheel).nv_fatbin(CUDAlibOpen3D.so)Most CUDA wheel bloat is embedded multi-arch SASS/PTX in
libOpen3D.so, not Python packaging overhead.Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Reduce CUDA wheel and install size by narrowing release GPU targets for CUDA 12.x (drop Turing SASS) and by aligning CI so release builds consistently use the common architecture list. Documents measured wheel breakdown from 0.19.0
main-devel(cp312, manylinux).Changes
80-real;86-real;89-real;90-real;90(Ampere through Hopper SASS, plus 90 PTX for forward compatibility.)
Replaces
75-real;80-real;86-real;89-real;90, dropping Turing (sm_75) from release builds.BUILD_COMMON_CUDA_ARCHS=ONon the installed-library CUDA wheel path so ML CUDA ops match the devellibOpen3Darch set;Expected impact
libOpen3D.so: removing one real architecture (75) from the fatbin should shrink the ~450 MiB NV fatbin section by on the order of ~10–15% (~50–90 MiB offlibOpen3D.so, ~50–90 MiB off the CUDA wheel once recompressed—exact numbers need a rebuild). Rough prior estimate was ~778 MiB → ~690 MiB forlibOpen3D.so.