Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
Namespaces | Functions
SYCLUtils.h File Reference

(d32b4fc (Mon Sep 14 15:46:25 2026 -0700))

Common SYCL utilities. More...

#include <cstdint>
#include <vector>
#include "open3d/core/Device.h"
#include "open3d/core/SYCLContext.h"

Go to the source code of this file.

Namespaces

namespace  open3d
 
namespace  open3d::core
 
namespace  open3d::core::sy
 

Functions

void open3d::core::sy::PrintSYCLDevices (bool print_all)
 
bool open3d::core::sy::IsAvailable ()
 Returns true if there is at least one SYCL device available.
 
bool open3d::core::sy::IsDeviceAvailable (const Device &device)
 Returns true if the specified SYCL device is available.
 
SYCLDevice open3d::core::sy::GetSYCLDeviceProperties (const Device &device)
 
bool open3d::core::sy::IsCPUDevice (const Device &device)
 
std::vector< Deviceopen3d::core::sy::GetAvailableSYCLDevices ()
 Return a list of available SYCL devices.
 
size_t open3d::core::sy::GetDeviceCount ()
 Return the number of available SYCL devices.
 
void open3d::core::sy::enablePersistentJITCache ()
 

Detailed Description

Common SYCL utilities.

SYCLUtils.h and SYCLUtils.cpp should compile when BUILD_SYCL_MODULE=ON or BUILD_SYCL_MODULE=OFF. Kernel launch helpers are available only in TUs compiled with SYCL (SYCL_LANGUAGE_VERSION).

oneDPL / out-of-order-queue barrier rule

Any oneapi::dpl::* algorithm that lacks an *_async variant (e.g. sort_by_key, stable_sort, upper_bound – most of oneDPL) is a synchronous host call: it blocks the calling thread until the device work it enqueues completes, but it does not inherit whatever else is already pending on the sycl::queue its device_policy wraps. On Open3D's own queues (always in_order, see SYCLContext.cpp) submission order alone is usually enough, EXCEPT when the earlier work was enqueued via a raw USM pointer the oneDPL call also touches through a different code path that the runtime cannot statically order (e.g. a preceding parallel_for writing into a buffer that a subsequent sort_by_key then reads as its key/value range – both are on the same in-order queue, so this specific case is actually fine; the real hazard is queues this code does not control). On a PyTorch XPU queue, which is NOT guaranteed in_order, submission order guarantees nothing at all. Rule: precede any such oneDPL call with an explicit queue.ext_oneapi_submit_barrier(deps) naming every event it depends on, rather than relying on submission order. See FixedRadiusSearchSYCLImpl.h's SortNeighborsByDistanceSYCL for the reference pattern.