Skip to content

About

A C++ header-only point cloud processing library accelerated with SYCL.

Topics

Resources

Stars

12 stars

Watchers

2 watching

Forks

Latest commit

 

History

1,502 Commits

Folders and files

Repository files navigation

sycl_points

Ask DeepWiki

sycl_points is a C++ header-only library for point cloud processing. It uses SYCL to accelerate operations.

Overview

sycl_points uses SYCL for point cloud processing on CPUs, Intel integrated GPUs, and NVIDIA GPUs. It supports two SYCL implementations:

  • Intel oneAPI DPC++ (default): Intel CPUs and integrated GPUs. For NVIDIA GPUs, use CUDA and build DPC++ from source.
  • AdaptiveCpp (formerly hipSYCL): OpenMP CPUs and NVIDIA GPUs with CUDA. AdaptiveCpp also supports AMD GPUs with HIP and other devices. This project does not support AMD GPUs.

The development of sycl_points used small_gicp and gtsam_points as references.

Key features

  • Point cloud data structures for CPU and accelerator memory. Host code and device kernels can get access to them.
  • Nearest neighbor search: KD-tree, octree, brute force
  • Registration
    • ICP: Point to Point, Point to Plane, Point to Distribution, GICP, Genz-ICP
    • Robust estimation (HUBER, TUKEY, CAUCHY, GEMAN_MCCLURE)
    • VICP: estimates sensor velocity to compensate for motion distortion. The source cloud must have a time field.
    • Rotation constraint with Jensen-Bregman LogDet divergence. Both clouds must have covariance matrices.
  • Submapping: voxel hashmap, occupancy grid map
  • Filtering: L∞ (Chebyshev) distance, random sampling, FPS, angle incidence, voxel grid and polar grid downsampling
  • File I/O: PLY and PCD, ASCII and binary, CPU and shared memory

The project plans to increase the parallel processing of its algorithms.

Supported devices

  • Intel CPU (OpenCL backend)
  • Intel iGPU (Level Zero or OpenCL backend)
  • NVIDIA GPU (CUDA backend)

The project expects AMD CPUs to work, but has not tested them. It does not support AMD GPUs and has not tested them because no hardware is available.

Requirements

Install dependencies

Eigen and GTest

sudo apt update
sudo apt install libeigen3-dev libgtest-dev

oneAPI DPC++

See the installation guide.

# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null

# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list

# install package
sudo apt update
sudo apt install intel-cpp-essentials

Intel oneAPI for NVIDIA GPUs (optional)

Binary packages are no longer available. Build Intel DPC++ from source. See docs/install_dpcpp_nvidia.md.

Intel GPU driver (optional)

See the driver documentation.

# add apt repository
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:kobuk-team/intel-graphics

# install compute related packages
sudo apt install -y intel-metrics-discovery intel-opencl-icd clinfo intel-gsc

# install media related packages
sudo apt install -y intel-media-va-driver-non-free libmfx1 libmfx-gen1 libvpl2 libvpl-tools libva-glx2 va-driver-all vainfo

# install OpenCL
sudo apt-get install -y intel-ocloc

# add permission
sudo gpasswd -a ${USER} render
newgrp render

AdaptiveCpp

See docs/install_adaptive_cpp.md.

Build and run example

Intel oneAPI DPC++ (default)

source /opt/intel/oneapi/setvars.sh

# build example
cd cpp
mkdir build && cd build
cmake .. -DSYCL_IMPL=IntelDPCPP
make

# show device list
sycl-ls

# # example output
# [level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Graphics 12.70.4 [1.6.33276+22]
# [opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) Ultra 7 265K OpenCL 3.0 (Build 0) [2025.19.4.0.18_160000.xmain-hotfix]
# [opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Graphics OpenCL 3.0 NEO  [25.13.33276]
# [cuda:gpu][cuda:0] NVIDIA CUDA BACKEND, NVIDIA GeForce RTX 3060 8.6 [CUDA 12.9]

# select the device with `ONEAPI_DEVICE_SELECTOR`

# run example with Level Zero device (iGPU)
ONEAPI_DEVICE_SELECTOR=level_zero:0 ./example_registration

# run example with OpenCL device (iGPU, alternative backend)
ONEAPI_DEVICE_SELECTOR=opencl:1 ./example_registration

# run example with CUDA device
ONEAPI_DEVICE_SELECTOR=cuda:0 ./example_registration

AdaptiveCpp

cd cpp

mkdir build && cd build
cmake .. -DSYCL_IMPL=AdaptiveCpp
make

# show device list
acpp-info -l

# # example output
# =================Backend information===================
# Loaded backend 0: Level Zero
#   Found device: Intel(R) Graphics
# Loaded backend 1: CUDA
#   Found device: NVIDIA GeForce RTX 5060 Ti
# Loaded backend 2: OpenCL
#   Found device: Intel(R) Graphics
# Loaded backend 3: OpenMP
#   Found device: AdaptiveCpp OpenMP host device

# select the device with `ACPP_VISIBILITY_MASK`
# for a specific CUDA device number, use `CUDA_VISIBLE_DEVICES`

# run example with Level Zero device
ACPP_VISIBILITY_MASK=ze ./example_registration

# run example with OpenCL device (alternative backend)
ACPP_VISIBILITY_MASK=ocl ./example_registration

# run example with CPU OpenMP
ACPP_VISIBILITY_MASK=omp ./example_registration

# run example with CUDA device
ACPP_VISIBILITY_MASK=cuda ./example_registration
# or
CUDA_VISIBLE_DEVICES=0 ./example_registration

NOTE: If you change SYCL_IMPL or ACPP_TARGETS, use a new build directory or delete CMakeCache.txt.
CMake keeps the selected compiler and targets in its cache.
If you test more than one configuration, use a separate directory for each configuration (for example, build_omp and build_cuda).

References

License

The project uses the Apache License 2.0.

About

A C++ header-only point cloud processing library accelerated with SYCL.

Topics

Resources

Stars

12 stars

Watchers

2 watching

Forks

Contributors

Languages