PyTorch xpu support (machine learning ops in sycl) - #7529
Open
ssheorey wants to merge 83 commits into
Open
Conversation
… Registration, RGBDOdometry, TransformationConverter Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
…L declaration Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
… to SYCL kernel files Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
…l-kernels-for-cuda
…e coverage Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
…ead of plain global atomics Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
…/Open3D into copilot/add-sycl-kernels-for-cuda
…als, RotatePoints, RotateNormals Co-authored-by: ssheorey <41028320+ssheorey@users.noreply.github.com>
…l-kernels-for-cuda
- Implemented SYCL device support in ImageImpl.h and PointCloud.h for various functions including ToSYCL, ClipTransformSYCL, and PyrDownDepthSYCL. - Added corresponding SYCL implementations in ImageSYCL.cpp and PointCloudSYCL.cpp. - Updated PointCloud.cpp and PointCloudImpl.h to handle SYCL devices in functions like Unproject, Project, and GetPointMaskWithinAABB. - Modified tests to accommodate SYCL devices, ensuring compatibility and skipping unsupported tests where necessary. - Introduced new test cases for SYCL in Python tests for nearest neighbor search and registration.
…rnels Implement SYCL custom kernels for TriangleMesh normals/areas and VoxelBlockGrid touch operations. Stub out remaining VoxelBlockGrid kernels due to core::HashMap limitations on SYCL, and add corresponding C++ and Python tests.
FP64 check missing hash function improved object copy fix early return bug in IndexAddContiguousSYCL use single workgroup launch to avoid atomics in ArgReduce (Check and revert) custom kernel for merging top-k results in KnnIndex (k<256) fix nanoflann call missing sort option Add RGB2Gray with tensor ops (for SYCL)
…L kernel invocations to use direct queue parallel_for calls. Add tests for nearest nbr and hashmap
SYCL nearest-neighbor search - Refactor tiled KNN/radius/hybrid into KnnSearchOpsSYCL.cpp + KnnSearchSYCLImpl.h so AddMM stays in the driver while top-K, count, and gather kernels are reusable and documented (small-k fused heap path vs legacy select/merge for large k). - Add configurable tile_bytes on KnnIndex/FixedRadiusIndex (defaults in NeighborSearchCommon.h) because integrated vs discrete Intel GPUs need different distance-tile sizes to stay cache-friendly without blowing memory. - Implement fused UpdateTopKFromTile for k ≤ 512, per-query threshold handling for radius/hybrid (radius² − |q|²), and finalize/clamp rules (C1/C4) so distances are non-negative and ties break by index like CPU/CUDA. - Extend C++/Python SYCL NNS tests (parity, coincident query, tie-break, radius, hybrid) to lock in correctness after the algorithm rewrite. SYCL hash map backend - Pack slot state, buf_index, and fingerprint into one uint64 per bucket to cut probe traffic and skip key-buffer loads on fingerprint mismatch. - Use power-of-two buckets with HashMix (fmix64) so probing uses masks instead of 64-bit modulo on GPU, and reserve/rehash when tombstones fill the table (GetNonEmptyCount + HashMap::Insert/Activate checks), not only live size. - Harden Insert for Intel Xe L1 coherence (seq_cst fences, LOCKED slots, restart-on-LOCKED instead of subgroup spin) to avoid stale keys and hangs. - Vectorize value copies via SYCLBlockCopyDispatch; improve GetActiveIndices with work-group scan + one atomic per group instead of per-slot atomics. - SYCLHashDeviceLookup uses plain loads when the table is read-only during raycast-style kernels. Core SYCL utilities - Add SYCLBlockCopyDispatch.h and use it in CopySYCL for object dtypes so copies use wide vector loads/stores instead of per-element queue.memcpy. Build and tooling (SYCL-without-CUDA / local dev) - Gate OPEN3D_CUDA_COMPILER_* defines and CompilerInfo CUDA strings on BUILD_CUDA_MODULE so SYCL-only builds do not reference undefined CUDA macros. - Add ENABLE_SANITIZER CMake option and wire -fsanitize into Open3D when set. - Comment out optional EGL/X11 linking block in cpp/open3d/CMakeLists.txt (local build adjustment—confirm this is intended before upstreaming).
Some optimizations. (e.g. restrict) lock free hashmap insert: write buffer then CAS design is correct and fast, but leaves holes in the data buffer. Center data before Knn, if using expanded L2 distance formula (p^2+q^2-2pq) to prevent cancellation bug in indexer: TensorIterator::GetPtr() incorrect for non-contiguous. Added Knn search benchmark
- SYCLContext: process-wide static singleton (was thread_local) to avoid per-thread SYCL contexts/USM mismatches; cache all device properties in one place (SYCLContext::Impl) and expose via GetDeviceProperties(). - Add SYCL launch helpers (SYCLPreferredWorkGroupSize, SYCLNdRange1D, group-reduction helpers) and use nd_range<1> + sycl::reduce_over_group across ParallelFor, elementwise, and reduction kernels instead of flat parallel_for(n) / per-output kernel launches. - ReductionSYCL: on-device GetInputPtrDevice() enables one kernel with one work-group per output for multi-output reductions (incl. arg-reductions). - Registration/RGBD odometry/SLAC kernels: accumulate AtA/Atb/residual in SLM per work-group (restrict-qualified pointers) instead of global atomics. - Rename SYCLBlockCopyDispatch.h -> BlockCopyDispatch.h, generalize the vectorized object-copy dispatch (up to 64-byte blocks) shared by the hash map and tensor copy paths; align CUDA hashmap Dispatch.h divisors to match. - Build: set -fsycl-max-parallel-link-jobs, prefer lld linker when available. - Update ParallelFor/Reduction benchmarks and Linalg/Tensor tests for the refactored SYCLContext API.
Add core::sy::IsCPUDevice() to detect the SYCL CPU fallback device and use it to throw clear errors from LeastSquaresSYCL (gels_batch), the SYCL hash map, and FixedRadiusSearch/HybridSearch, which are broken on SYCL CPU. Skip the corresponding C++ tests (HashMap, NNS, VoxelBlockGrid, Registration, Feature, PointCloud) and opt affected Python tests out of the SYCL CPU fallback via list_devices(also_sycl_cpu=False).
…ck-copy divisor, restore fast-path reduction
- ParallelFor.h: single sycl::event-returning body with thin forwarder
overloads (blocking/non-blocking/Device/queue), used across NNS,
hashmap, and elementwise kernels.
- SYCLUtils.h: add sy::PreferredWorkGroupSize (no-SLM default) and
sy::MaxWorkGroupSizeForSLM (large-WG path for SLM/barrier kernels,
per Intel's SYCL GPU optimization guidance); restructure
PersistentReduce's merge phase to a private-partial + reduce_over_group
scheme instead of an SLM-atomic tree, removing lane contention, and
size its work-groups via the new SLM helper. Move its scratch
allocations to sycl::buffer.
- SYCLContext.{h,cpp}: cache per-device compute-unit counts
(GetComputeUnits), reused by GemmSYCL and PersistentReduce.
- BlockCopyDispatch.h: fix the 12-byte block-copy type (sycl::vec<uint32_t,3>
is 16-byte aligned/sized on this toolchain, not 12); add static_asserts.
- ReductionSYCL.cpp: restrict the manual SLM-tree group reduction to
sycl::multiplies (works around an Arc A770 reduce_over_group driver bug
for that op only) and restore the built-in reduce_over_group fast path
for sum/min/max/logical ops; add an Int64 Prod multi-output regression
test (Tensor.cpp).
- kernel/{BinaryEWSYCL,IndexGetSetSYCL}.cpp: convert bare-range launches to
the consolidated core::ParallelFor helper.
- t/pipelines/kernel/{RegistrationSYCL,RGBDOdometrySYCL,
FillInLinearSystemSYCL}.cpp: size PersistentReduce-driven and other
SLM/barrier kernels via MaxWorkGroupSizeForSLM.
…capacity check - FixedRadiusSearchSYCLImpl.h: move BuildSpatialHashTableSYCLRaw and SortNeighborsByDistanceSYCL to explicit sycl::event chaining instead of wait_and_throw between passes (Pass1 counts -> inclusive_scan_async -> Pass3 scatter; radix-sort -> upper_bound query-id fill -> write); fix a genuine free-before-wait UB on slot_counts_ptr by moving it to a sycl::buffer; fix sort_by_key's default comparator returning wrong order on Arc A770 by passing an explicit comparator, and a use-after-free in the float radix-sort path by waiting before the Tensor scratch frees; replace the serial per-query id fill with a batched oneDPL upper_bound; thread a Metric parameter through WriteNeighborsHybridSYCL so hybrid search supports L1/L2/Linf like fixed-radius search (was L2-only). - KnnSearchOpsSYCL.cpp: wire the new Metric parameter and threshold helper into HybridSearchSYCL; wait once at the Tensor-API boundary. - KnnSearchSYCLImpl.h: convert bare-range top-k launches to nd_range. - SYCLHashBackend.h: chain Insert's heap-top read as an event dependency instead of a blocking memcpy; add a capacity-overflow LogError guard. - BuildSpatialHashTableOpKernelSYCL.cpp: return the non-blocking event to the PyTorch-facing op instead of waiting inline.
…rload, kernel_args_restrict
- GemmSYCL.{h,cpp}: return sycl::event from GemmColumnMajorSYCL instead of
blocking (queue.wait_and_throw), freeing the workspace via a
deferred host_task; use the cached SYCLContext compute-unit count
instead of querying CUTLASS's device-0 heuristic; collapse the 3-tile
probe loop to a single tile try per precision, falling through to IEEE
fp32 on failure; add an alignment check (lda/ldb/ldc/m/n/k divisible by
4) that falls back to IEEE with a one-time LogWarning when allow_tf32
is requested but alignment doesn't hold.
- continuous_conv/*.h, sparse_conv/*.h: thread the GEMM event through
each chunked loop's FillColumn/MultiplyColumns dependencies instead of
relying on GemmColumnMajorSYCL's old internal blocking.
- IoU.h/IoUSYCL.cpp: add sycl::queue&-taking overloads alongside the
existing core::Device overloads (pybind's iou.cpp is compiled without
-fsycl and cannot see a complete sycl::queue type, so the Device
overload stays as the thin facade for that caller).
- NmsSYCL.cpp, RoiPoolKernel{,SYCL}.cpp: move kernel-private scratch
(mask, remv, count, pts_assign, pts_idx) to sycl::buffer, removing
free-before-wait hazards and inline waits.
- Add [[intel::kernel_args_restrict]] to non-aliasing ML kernels in
RoiPoolKernelSYCL.cpp, NmsSYCL.cpp, InterpolatePointsSYCL.h,
BallQuerySYCL.h, and the continuous_conv/sparse_conv kernel files.
…ferences - CHANGELOG.md: document SYCL ML ops (conv, voxelize, contrib NMS/RoIPool/ BallQuery/IoU/etc.), hybrid L1/Linf search support, allow_tf32 alignment fallback, and the RoIPool point-selection divergence. - docs/sycl.rst: update the NNS support matrix to note L1/L2/Linf metric coverage; add a 'Known numerical differences vs. CPU/CUDA' section covering RoIPool and allow_tf32; update the manual-install package names from intel-basekit/intel-cpp-essentials to intel-oneapi-toolkit/intel-deep-learning-essentials. - docs/compilation.rst: update the dpcpp-cpp-rt example pin to 2026.0.0 and refer to the 'Intel oneAPI Toolkit' by its current name.
# Conflicts: # CHANGELOG.md # cpp/benchmarks/CMakeLists.txt # cpp/open3d/core/BlockCopyDispatch.h # cpp/open3d/core/Indexer.h # cpp/open3d/core/ParallelFor.h # cpp/open3d/core/SYCLContext.cpp # cpp/open3d/core/SYCLContext.h # cpp/open3d/core/SYCLUtils.h # cpp/open3d/core/hashmap/SYCL/SYCLHashBackend.h # cpp/open3d/core/kernel/BinaryEWSYCL.cpp # cpp/open3d/core/kernel/IndexGetSetSYCL.cpp # cpp/open3d/core/kernel/ReductionSYCL.cpp # cpp/open3d/core/nns/KnnSearchOpsSYCL.cpp # cpp/open3d/core/nns/kernel/FixedRadiusSearchSYCLImpl.h # cpp/open3d/core/nns/kernel/KnnSearchSYCLImpl.h # cpp/open3d/t/geometry/kernel/PointCloudSYCL.cpp # cpp/open3d/t/pipelines/kernel/FillInLinearSystemSYCL.cpp # cpp/open3d/t/pipelines/kernel/RGBDOdometrySYCL.cpp # cpp/open3d/t/pipelines/kernel/RegistrationSYCL.cpp # cpp/tests/core/Tensor.cpp # docs/sycl.rst # python/test/open3d_test.py
There was a problem hiding this comment.
Pull request overview
This PR extends Open3D’s SYCL (“xpu”) support to the Open3D-ML / PyTorch ops stack, adding SYCL kernels and wiring them into packaging, CI tooling, and documentation so PyTorch +xpu workflows can run across key ML ops and contrib kernels.
Changes:
- Add SYCL/XPU implementations and dispatch for multiple PyTorch ML ops (conv ops, PointNet/PVCNN ops, misc ops) plus contrib IoU/RoI pool/NMS support.
- Update build/packaging to produce a single
open3d_{torch,tf}_opsper configure and update Python loaders accordingly. - Update CI/tooling + docs for oneAPI 2026.x, SYCL runtime pinning, and known backend numerical differences; extend/adjust tests for SYCL behavior.
Reviewed changes
Copilot reviewed 143 out of 143 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| util/install_oneapi_windows.ps1 | Pin Windows oneAPI installer to 2026.0.0 for XPU CI builds. |
| util/ci_utils.sh | Bump PyTorch version used in CI utilities. |
| python/test/ml/test_contrib_iou.py | Enable SYCL devices and add SYCL IoU test coverage. |
| python/test/ml_ops/test_three_nn.py | Relax equality checks to account for valid SYCL tie-breaking differences. |
| python/test/ml_ops/test_subsampling.py | Clarify why subsampling tests remain TF-only gated. |
| python/test/ml_ops/test_roi_pool.py | Replace fixed golden-output compare with input-consistency checks for SYCL. |
| python/test/ml_ops/test_query_pts.py | Replace fixed golden-output compare with geometric validity checks for SYCL. |
| python/test/ml_ops/test_cublas.py | Skip CUDA-only cublas test for XPU. |
| python/test/ml_ops/test_cconv_python.py | Add PyTorch-only conv3d comparison test (TF-independent). |
| python/test/ml_ops/mltest.py | Add Torch XPU module detection and treat xpu as GPU-like for helpers. |
| python/requirements_sycl.txt | Pin SYCL runtime dependency to 2026.0.0. |
| python/open3d/visualization/tensorboard_plugin/util.py | Defer rendering import to avoid eager import side effects. |
| python/open3d/ml/torch/init.py | Simplify ops library loading path (single flat location). |
| python/open3d/ml/tf/python/ops/lib.py | Simplify TF ops library loading path (single flat location). |
| open3d-artifacts/.keep | Remove placeholder file for artifacts directory. |
| docs/sycl.rst | Document SYCL feature matrix updates and known numerical differences. |
| docs/compilation.rst | Update SYCL runtime/toolkit wording and pinned version example. |
| docker/docker_build.sh | Update SYCL base image to intel/oneapi-toolkit:2026.0.1 and revise comments. |
| cpp/tests/core/Tensor.cpp | Add SYCL regression test for Int64 multi-output Prod reduction. |
| cpp/pybind/ml/contrib/iou.cpp | Add SYCL bindings for IoU (BEV + 3D) via SYCL tensors and kernels. |
| cpp/pybind/ml/CMakeLists.txt | Adjust pybind ML sources list formatting. |
| cpp/pybind/make_python_package.cmake | Copy ML ops libraries flat into open3d/ during packaging. |
| cpp/open3d/t/pipelines/kernel/RGBDOdometrySYCL.cpp | Update work-group size selection for barrier/SLM-heavy reductions. |
| cpp/open3d/t/pipelines/kernel/RegistrationSYCL.cpp | Update work-group size selection for barrier/SLM-heavy reductions. |
| cpp/open3d/t/pipelines/kernel/FillInLinearSystemSYCL.cpp | Update work-group size selection for barrier/SLM-heavy reductions. |
| cpp/open3d/ml/tensorflow/CMakeLists.txt | Stop arch-splitting TF ops output directories; rely on internal dispatch. |
| cpp/open3d/ml/pytorch/TorchHelper.h | Include open3d/core/Device.h for new usage. |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvTransposeOpKernelSYCL.cpp | Add Torch XPU wrapper for sparse conv transpose (SYCL). |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvTransposeOpKernel.h | Declare sparse conv transpose SYCL wrapper template. |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvTransposeBackpropFilterOpKernelSYCL.cpp | Add Torch XPU wrapper for sparse conv transpose filter backprop (SYCL). |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvTransposeBackpropFilterOpKernel.h | Declare sparse conv transpose filter backprop SYCL wrapper template. |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvOpKernelSYCL.cpp | Add Torch XPU wrapper for sparse conv forward (SYCL). |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvOpKernel.h | Declare sparse conv forward SYCL wrapper template. |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvBackpropFilterOpKernelSYCL.cpp | Add Torch XPU wrapper for sparse conv filter backprop (SYCL). |
| cpp/open3d/ml/pytorch/sparse_conv/SparseConvBackpropFilterOpKernel.h | Declare sparse conv filter backprop SYCL wrapper template. |
| cpp/open3d/ml/pytorch/pvcnn/TrilinearDevoxelizeOps.cpp | Extend devoxelize op to dispatch to CUDA or SYCL/XPU. |
| cpp/open3d/ml/pytorch/pvcnn/TrilinearDevoxelizeKernelSYCL.cpp | Add Torch XPU wrapper calling SYCL devoxelize kernels on PyTorch queue. |
| cpp/open3d/ml/pytorch/pvcnn/TrilinearDevoxelizeKernel.h | Declare devoxelize SYCL launcher wrappers. |
| cpp/open3d/ml/pytorch/pointnet/SamplingOps.cpp | Extend furthest-point-sampling to dispatch to CUDA or SYCL/XPU. |
| cpp/open3d/ml/pytorch/pointnet/SamplingKernel.h | Declare SYCL launcher for furthest-point-sampling. |
| cpp/open3d/ml/pytorch/pointnet/InterpolateOps.cpp | Extend three_nn / three_interpolate(_grad) to dispatch to CUDA or SYCL/XPU. |
| cpp/open3d/ml/pytorch/pointnet/InterpolateKernelSYCL.cpp | Add Torch XPU wrappers calling SYCL interpolate kernels on PyTorch queue. |
| cpp/open3d/ml/pytorch/pointnet/InterpolateKernel.h | Declare SYCL launchers for interpolate kernels. |
| cpp/open3d/ml/pytorch/pointnet/BallQueryOps.cpp | Extend ball_query to dispatch to CUDA or SYCL/XPU. |
| cpp/open3d/ml/pytorch/pointnet/BallQueryKernelSYCL.cpp | Add Torch XPU wrapper calling SYCL ball_query on PyTorch queue. |
| cpp/open3d/ml/pytorch/pointnet/BallQueryKernel.h | Declare SYCL launcher for ball_query. |
| cpp/open3d/ml/pytorch/misc/VoxelizeOps.cpp | Add SYCL/XPU dispatch path for voxelize op. |
| cpp/open3d/ml/pytorch/misc/VoxelizeOpKernelSYCL.cpp | Implement Torch XPU wrapper dispatching into SYCL voxelize kernels. |
| cpp/open3d/ml/pytorch/misc/VoxelizeOpKernel.h | Declare voxelize SYCL dispatch template. |
| cpp/open3d/ml/pytorch/misc/RoiPoolOps.cpp | Add CUDA/XPU/CPU dispatch for roi_pool (with XPU queue integration). |
| cpp/open3d/ml/pytorch/misc/ReduceSubarraysSumOps.cpp | Add SYCL/XPU dispatch for reduce-subarrays-sum. |
| cpp/open3d/ml/pytorch/misc/ReduceSubarraysSumOpKernelSYCL.cpp | Add Torch XPU wrapper calling SYCL reduce-subarrays-sum kernel. |
| cpp/open3d/ml/pytorch/misc/ReduceSubarraysSumOpKernel.h | Declare reduce-subarrays-sum SYCL wrapper template. |
| cpp/open3d/ml/pytorch/misc/RaggedToDenseOps.cpp | Add SYCL/XPU dispatch for ragged-to-dense. |
| cpp/open3d/ml/pytorch/misc/RaggedToDenseOpKernelSYCL.cpp | Add Torch XPU wrapper calling SYCL ragged-to-dense kernel. |
| cpp/open3d/ml/pytorch/misc/RaggedToDenseOpKernel.h | Declare ragged-to-dense SYCL wrapper template. |
| cpp/open3d/ml/pytorch/misc/NmsOps.cpp | Add XPU path and optimize CUDA path to keep indices on-device. |
| cpp/open3d/ml/pytorch/misc/InvertNeighborsListOps.cpp | Add SYCL/XPU dispatch for invert-neighbors-list. |
| cpp/open3d/ml/pytorch/misc/InvertNeighborsListOpKernelSYCL.cpp | Add Torch XPU wrapper calling SYCL invert-neighbors-list kernel. |
| cpp/open3d/ml/pytorch/misc/InvertNeighborsListOpKernel.h | Declare invert-neighbors-list SYCL wrapper template. |
| cpp/open3d/ml/pytorch/misc/FixedRadiusSearchOps.cpp | Add SYCL/XPU path for fixed-radius search. |
| cpp/open3d/ml/pytorch/misc/BuildSpatialHashTableOps.cpp | Add SYCL/XPU path for spatial hash table build. |
| cpp/open3d/ml/pytorch/misc/BuildSpatialHashTableOpKernelSYCL.cpp | Implement Torch XPU wrapper calling shared NNS hash-table build. |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvTransposeOpKernelSYCL.cpp | Add Torch XPU wrapper for continuous conv transpose (SYCL). |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvTransposeOpKernel.h | Declare continuous conv transpose SYCL wrapper template. |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvTransposeBackpropFilterOpKernelSYCL.cpp | Add Torch XPU wrapper for continuous conv transpose filter backprop (SYCL). |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvTransposeBackpropFilterOpKernel.h | Declare continuous conv transpose filter backprop SYCL wrapper template. |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvOpKernelSYCL.cpp | Add Torch XPU wrapper for continuous conv forward (SYCL). |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvOpKernel.h | Declare continuous conv forward SYCL wrapper template. |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvBackpropFilterOpKernelSYCL.cpp | Add Torch XPU wrapper for continuous conv filter backprop (SYCL). |
| cpp/open3d/ml/pytorch/continuous_conv/ContinuousConvBackpropFilterOpKernel.h | Declare continuous conv filter backprop SYCL wrapper template. |
| cpp/open3d/ml/pytorch/CMakeLists.txt | Add SYCL build wiring, new sources, link deps, and fix SYCL_COMPILER shadowing. |
| cpp/open3d/ml/impl/sparse_conv/SparseConvTransposeBackpropFilter.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/sparse_conv/SparseConvTranspose.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/sparse_conv/SparseConvSYCLKernels.h | Add SYCL declarations for sparse-conv column-fill kernels. |
| cpp/open3d/ml/impl/sparse_conv/SparseConvBackpropFilter.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/sparse_conv/SparseConv.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/misc/ReduceSubarraysSumSYCL.h | Add SYCL implementation of ReduceSubarraysSum. |
| cpp/open3d/ml/impl/misc/RaggedToDenseSYCL.h | Add SYCL implementation of RaggedToDense. |
| cpp/open3d/ml/impl/GemmSYCL.h | Add SYCL GEMM shim API (sycl-tla instantiation separated). |
| cpp/open3d/ml/impl/GemmCUDA.h | Add CUDA GEMM shim API (CUTLASS device::Gemm wrapper). |
| cpp/open3d/ml/impl/continuous_conv/ContinuousConvTransposeBackpropFilter.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/continuous_conv/ContinuousConvTranspose.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/continuous_conv/ContinuousConvSYCLKernels.h | Add SYCL declarations for continuous-conv column-fill kernels. |
| cpp/open3d/ml/impl/continuous_conv/ContinuousConvBackpropFilter.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/impl/continuous_conv/ContinuousConv.cuh | Switch CUDA GEMM usage to shared GemmCUDA.h shim. |
| cpp/open3d/ml/contrib/RoiPoolKernel.h | Factor shared pt-in-box helper and add SYCL launcher declaration. |
| cpp/open3d/ml/contrib/RoiPoolKernel.cu | Remove duplicated device helper now shared in header. |
| cpp/open3d/ml/contrib/RoiPool.cpp | Add CPU RoiPool implementation used by Torch op dispatch. |
| cpp/open3d/ml/contrib/Nms.cu | Change CUDA NMS to device-side greedy keep loop with tensor output buffer. |
| cpp/open3d/ml/contrib/Nms.cpp | Refactor CPU NMS to use shared greedy keep helper. |
| cpp/open3d/ml/contrib/IoUSYCL.cpp | Add SYCL IoU kernels and core::Device queue-resolving overloads. |
| cpp/open3d/ml/contrib/IoU.h | Add SYCL IoU kernel declarations and device overload docs/guarding. |
| cpp/open3d/ml/contrib/CMakeLists.txt | Build SYCL IoU device code only when SYCL module is enabled. |
| cpp/open3d/core/SYCLContext.h | Add cached device properties and ambient-queue support types. |
| cpp/open3d/core/SYCLContext.cpp | Implement queue overrides, compute-unit caching, and new device properties. |
| cpp/open3d/core/nns/KnnSearchOpsSYCL.cpp | Extend hybrid search metrics; tighten sort synchronization contract. |
| cpp/open3d/core/nns/kernel/KnnSearchSYCLImpl.h | Improve kernel launches (nd_range) and include ParallelFor. |
| cpp/open3d/core/kernel/ReductionSYCL.cpp | Restrict manual group-reduce workaround and add missing includes. |
| cpp/open3d/core/kernel/IndexGetSetSYCL.cpp | Route indexing kernels via core::ParallelFor. |
| cpp/open3d/core/kernel/BinaryEWSYCL.cpp | Route elementwise kernels via core::ParallelFor. |
| cpp/open3d/core/hashmap/SYCL/SYCLHashBackend.h | Improve documentation and remove avoidable host wait in Insert. |
| cpp/open3d/core/BlockCopyDispatch.h | Fix SYCL 12-byte block copy type and add size static_asserts. |
| cpp/benchmarks/CMakeLists.txt | Link SYCL thirdparty when SYCL module is enabled. |
| CHANGELOG.md | Document new SYCL ML ops and SYCL NNS metric support changes. |
| 3rdparty/sycl_tla/sycl_tla.cmake | Add sycl-tla external project wiring and patching. |
| 3rdparty/sycl_tla/apply_patch.sh | Add helper script for applying sycl-tla compatibility patch. |
| 3rdparty/sycl_tla/0001-fix-oneapi-2025.3-ieee-gemm.patch | Add sycl-tla patch for oneAPI 2025.3 compatibility. |
| 3rdparty/cutlass/cutlass.cmake | Update CUTLASS to v4.2.1 and adjust include dir. |
| .github/workflows/macos.yml | Update PyTorch version comment in CI workflow. |
Comment on lines
+60
to
+64
| ball_query_launcher(batch_size, pts_num, ball_num, radius, nsample, | ||
| center_data, xyz_data, idx); | ||
| #else | ||
| TORCH_CHECK(false, "ball_query was not compiled with CUDA support") | ||
| #endif |
Comment on lines
+67
to
+71
| ball_query_launcher_sycl(batch_size, pts_num, ball_num, radius, nsample, | ||
| center_data, xyz_data, idx); | ||
| #else | ||
| TORCH_CHECK(false, "ball_query was not compiled with SYCL support") | ||
| #endif |
Comment on lines
+44
to
+47
| TORCH_CHECK(features.is_cuda() || features.is_xpu(), | ||
| "features must be a CUDA or XPU tensor") | ||
| TORCH_CHECK(coords.is_cuda() || coords.is_xpu(), | ||
| "coords must be a CUDA or XPU tensor") |
Comment on lines
66
to
+70
| CALL(float, VoxelizeCUDA) | ||
| CALL(double, VoxelizeCUDA) | ||
| #else | ||
| TORCH_CHECK(false, "Voxelize was not compiled with CUDA support") | ||
| #endif |
Comment on lines
+18
to
+22
| DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/sycl_tla" | ||
| PATCH_COMMAND | ||
| /bin/bash ${CMAKE_CURRENT_LIST_DIR}/apply_patch.sh | ||
| ${CMAKE_CURRENT_LIST_DIR}/0001-fix-oneapi-2025.3-ieee-gemm.patch | ||
| <SOURCE_DIR> |
…docs cleanup
- Add TorchHelper.h WarnIfTF32NotSupported(): CPU/CUDA now accept allow_tf32
in their signature (matching SYCL) and log a warning instead of silently
ignoring the request, since only the SYCL backend actually uses it for
Intel XMX tensor-core GEMM.
- Add TorchHelper.h RunSYCLWithTempMemory(): factors out the query-then-run
two-pass temp-memory pattern shared by all 8 SYCL conv-op kernels,
replacing duplicated ~15-20 argument call sites.
- Collapse the now-identical CPU/CUDA/SYCL CALL/FN_PARAMETERS macro pairs in
the 4 conv-op dispatch files (SparseConv{,Transpose}Ops.cpp,
ContinuousConv{,Transpose}Ops.cpp) into single unified macros.
- Fix IoU.h: unconditionally including <sycl/sycl.hpp> under
BUILD_SYCL_MODULE broke pybind/ml/contrib/iou.cpp, which is not
-fsycl-compiled and has no SYCL include path. Mirror SYCLContext.h's
existing pattern (real header only under SYCL_LANGUAGE_VERSION, else
forward-declare sycl::queue) since pybind only calls the core::Device
overload and never needs the complete type.
- sycl_tla.cmake: replace the shallow git clone with a pinned-commit GitHub
zip download (URL/URL_HASH), matching the pattern used by other 3rdparty
deps, for reproducible/verifiable fetches.
- find_dependencies.cmake: trim the curl/openssl archive-group comment.
- Move 4 orphaned internal design/planning docs into docs/dev/ (not
referenced by any Sphinx toctree); add docs/dev/ml_ops_backend_coverage_gaps.md
documenting the CPU/CUDA/SYCL backend gaps that remain (VoxelPooling,
legacy KnnSearch/MultiRadiusSearch, TrilinearDevoxelize) and their usage
in Open3D-ML.
- test_query_pts.py/test_roi_pool.py: drop unused unpacked variables
(Codacy).
Verified: full open3d_torch_ops + Open3D rebuild, install-pip-package, and
ml_ops python tests (20 files, ~7300+ cases) all pass except the
pre-existing/unrelated test_ragged_tensor.py float64 SYCL fp64 hardware
limitation.
…e .so's
open3d_torch_ops.so had its own BUILD_RPATH override ("$ORIGIN/..", added
long ago just to find TBB) that discarded the broader RPATH already set by
open3d_set_global_properties() for libOpen3D/pybind. That broader RPATH
includes a hop into the Python virtual env's lib/ folder, where pip-installed
Intel oneAPI packages (dpcpp-cpp-rt, intel-sycl-rt, ...) place their runtime
.so's (libsycl.so, libsvml.so, libiomp5.so, etc). Without it,
torch.ops.load_library() on open3d_torch_ops.so could only find these via
LD_LIBRARY_PATH.
Fix: drop the open3d_torch_ops-local override so it inherits the same RPATH
as libOpen3D/pybind.
While verifying, also found and fixed an existing off-by-one in that shared
RPATH list: it only had a 4-level-up "../../../../" hop (designed for a
nested arch-subdir wheel layout, e.g. site-packages/open3d/cuda/foo.so ->
<venv>/lib), but this flat SYCL wheel layout (site-packages/open3d/foo.so)
needs a 3-level-up "../../../" hop to reach <venv>/lib. This bug affected
libOpen3D.so and pybind too (not just open3d_torch_ops), i.e. even the main
"import open3d" already silently depended on LD_LIBRARY_PATH being set for
this wheel layout.
Verified: rebuilt + reinstalled the wheel, and with LD_LIBRARY_PATH
explicitly unset, "import open3d", "import open3d.ml.torch", and
python/test/ml_ops/{test_sparseconv,test_cconv,test_knn_search}.py
(180 passed, 3 skipped) all succeed using RPATH alone.
Open3DRoiPool only had a DEVICE_GPU TF kernel registered (RoiPoolOpKernel.cu, built under BUILD_CUDA_MODULE). An earlier commit in this branch widened test_roi_pool.py from @ml_gpu_only to @ml, so it now also exercises the TF CPU device (ml0), which raised tensorflow.python.framework.errors_impl.NotFoundError: Could not find device for node: {{node Open3DRoiPool}} on CPU-only CI configs (e.g. "ubuntu (ON)", BUILD_CUDA_MODULE=OFF). A CPU implementation (roipool3dLauncherCPU) already existed in open3d::ml::contrib (added earlier for PyTorch CPU/SYCL parity) and is already used by the PyTorch CPU path in cpp/open3d/ml/pytorch/misc/RoiPoolOps.cpp. This adds the analogous TF DEVICE_CPU registration (RoiPoolOpKernelCPU.cpp, following the same pattern as NmsOpKernel.cpp/NmsOpKernelCPU) and wires ../contrib/RoiPool.cpp (which defines roipool3dLauncherCPU) into open3d_tf_ops's always-built sources, since it was previously only pulled in transitively via the CUDA-only source list. Verified locally: built open3d_tf_ops (BUILD_TENSORFLOW_OPS=ON, BUILD_CUDA_MODULE=OFF) and reinstalled the wheel; with LD_LIBRARY_PATH unset, python/test/ml_ops/test_roi_pool.py passes for all 3 device variants (TF CPU, torch CPU, torch xpu): 3 passed, 1 warning.
…ync everywhere possible.
… regression - cutlass::arch::global_load/global_store in the vendored sycl-tla only implemented the IEEE-fp32 GEMM epilogue's device read/write via CUDA PTX, guarded by a macro that's never defined on genuine SPIR-V/Intel targets. The epilogue silently no-op'd on real XPU hardware, producing all-zero GEMM output. Add a SYCL-native fallback and fold it into the existing sycl_tla ieee-gemm patch. This was the root cause of the test_sparseconv/test_knn_search/test_nms ml_ops failures on XPU. - Fix test_sparseconv_allow_tf32 comparing two differently-initialized SparseConv layers instead of toggling allow_tf32 on a single layer. - Remove leftover debug instrumentation from ContinuousConvSYCL.h. - Restore the global index offset in CUDA KnnSearchOps.cu's multi-batch combine step, lost during the ready_event/user_stream refactor; without it, batches after the first returned point indices local to their own slice instead of into the full points tensor. - Document verification results and known pre-existing/out-of-scope test failures in docs/dev/pr_7529_flagged_issues.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/ubuntu-sycl.yml # cpp/open3d/core/hashmap/SYCL/SYCLHashBackend.h
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
Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description