Conversation
ssheorey
commented
Aug 20, 2026
Member
- Include parity tests between CPU and GPU (CUDA or XPU) backends.
- Download and use the latest main-devel Open3D wheel instead of building from source.
- pointtransformer fully supports all 3 backends (cpu, cuda, xpu)
update CI to use prebuilt wheel cpu parity tests (simplified)
Use accelerator-aware device defaults and .to() paths, configurable run_ci.sh (cpu/cuda/xpu), and GitHub Actions on cpu-only without parity tests. Document torch model test coverage and CPU/CUDA/XPU parity in howtos and tests. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR adds Intel GPU (XPU/SYCL) support across the Open3D-ML PyTorch stack and introduces CPU↔accelerator parity tests to validate correctness across CPU, CUDA, and XPU backends. It also updates CI to test against prebuilt Open3D “main-devel” wheels instead of building Open3D from source.
Changes:
- Adds PyTorch CPU vs CUDA/XPU parity test helpers and a dedicated parity-focused torch model test suite.
- Extends device selection and custom-op gating to support
xpu/syclacross pipelines, models, and utilities. - Updates CI and dependency requirements to use prebuilt Open3D wheels and backend-specific PyTorch installs (CPU/CUDA/XPU).
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/torch_backend_parity.py | Adds shared CPU↔CUDA/XPU parity assertions for outputs and gradients. |
| tests/test_models_torch.py | New parity + smoke tests for registered PyTorch models across CPU/CUDA/XPU. |
| tests/test_models_tf.py | Removes legacy torch tests from TF test module; improves repo-root path handling. |
| tests/run_tests.sh | Runs each pytest test case in a separate process to avoid XPU/SYCL state issues. |
| scripts/run_pipeline.py | Expands device help/handling and adjusts distributed worker device string formatting. |
| requirements-torch.txt | Bumps CPU PyTorch/torchvision requirements. |
| requirements-torch-xpu.txt | Adds XPU-specific PyTorch/torchvision requirements. |
| requirements-torch-cuda.txt | Bumps CUDA PyTorch/torchvision requirements. |
| README.md | Documents installing XPU PyTorch requirements and links parity testing docs. |
| ml3d/utils/tensorboard_o3d.py | Adds helper to conditionally register Open3D TensorBoard plugin on GUI builds. |
| ml3d/utils/open3d_ops.py | Centralizes “PyTorch ops built” checks and a consistent error for missing ops. |
| ml3d/utils/builder.py | Extends device name conversion to include xpu/sycl. |
| ml3d/torch/utils/torch_utils.py | Adds default_training_device() to pick cuda/xpu/cpu consistently. |
| ml3d/torch/utils/roipool3d/roipool3d_utils.py | Switches custom-op import/guards to BUILD_PYTORCH_OPS-based gating (XPU-friendly). |
| ml3d/torch/utils/pointnet/pointnet2_utils.py | Switches custom-op import/guards to BUILD_PYTORCH_OPS-based gating (XPU-friendly). |
| ml3d/torch/utils/objdet_helper.py | Updates docstrings to explicitly include xpu device usage. |
| ml3d/torch/pipelines/semantic_segmentation.py | Uses conditional TensorBoard plugin registration; updates device defaulting to be accelerator-aware. |
| ml3d/torch/pipelines/object_detection.py | Uses conditional TensorBoard plugin registration; improves DDP device_ids handling. |
| ml3d/torch/pipelines/base_pipeline.py | Adds default device selection and xpu handling; adjusts distributed device setup logic. |
| ml3d/torch/models/sparseconvnet.py | Defaults model device based on available accelerator (cuda/xpu/cpu). |
| ml3d/torch/models/randlanet.py | Updates loss docstring to include xpu. |
| ml3d/torch/models/pvcnn.py | Defaults model device based on available accelerator; gates custom ops via BUILD_PYTORCH_OPS. |
| ml3d/torch/models/point_transformer.py | Fixes KNN device handling to preserve original device (cuda/xpu/cpu). |
| ml3d/torch/models/point_rcnn.py | Defaults model device based on available accelerator (cuda/xpu/cpu). |
| ml3d/torch/models/point_pillars.py | Defaults model device based on available accelerator (cuda/xpu/cpu). |
| ml3d/torch/models/base_model.py | Updates loss docstring to include xpu. |
| ml3d/torch/dataloaders/concat_batcher.py | Updates docstring to include xpu. |
| ml3d/metrics/init.py | Adds SYCL iou backend selection path. |
| docs/howtos.md | Adds documentation on CPU/CUDA/XPU parity testing and CI limitations. |
| ci/run_ci.sh | Reworks CI to download/install Open3D wheels per backend and run appropriate test subsets. |
| .github/workflows/ubuntu.yml | Updates GitHub Actions workflow to use the new CPU-wheel-based CI path. |
Suppressed comments (2)
ml3d/torch/pipelines/semantic_segmentation.py:663
ensure_tensorboard_plugin()can return False on headless Open3D builds (BUILD_GUI=OFF), butwriter.add_3d(...)is still called unconditionally. That will raiseAttributeErrorif the plugin couldn't be imported/registered. Consider guarding the add_3d call (e.g.,if ensure_tensorboard_plugin(): ...) or skipping 3D summaries when the plugin is unavailable.
for stage in self.summary:
ensure_tensorboard_plugin()
for key, summary_dict in self.summary[stage].items():
label_to_names = summary_dict.pop('label_to_names', None)
writer.add_3d('/'.join((stage, key)),
summary_dict,
epoch,
max_outputs=0,
label_to_names=label_to_names)
ml3d/torch/pipelines/object_detection.py:534
- Same issue as semantic_segmentation:
ensure_tensorboard_plugin()return value is ignored, butwriter.add_3d(...)is called unconditionally. On BUILD_GUI=OFF wheels this will likely fail at runtime when saving logs.
for stage in self.summary.keys():
ensure_tensorboard_plugin()
for key, summary_dict in self.summary[stage].items():
label_to_names = summary_dict.pop('label_to_names', None)
writer.add_3d('/'.join((stage, key)),
summary_dict,
epoch,
max_outputs=0,
label_to_names=label_to_names)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use device_index for distributed CUDA set_device, device-specific sync fallbacks in parity tests, drop dead TF cuda:N parsing, and gate SYCL IoU kernels on non-CPU SYCL devices. CI sets OPEN3D_ML_ROOT so pytest uses this checkout's PointTransformer until the wheel bundle catches up. Co-authored-by: Cursor <cursoragent@cursor.com>
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.