3rdparty/README_SYCL.md
Note: this file will be moved to the docs folder once SYCL support is mature.
Open3D's SYCL support runs on DPC++ and requires oneAPI dependencies. For convenience, in the source code, we use the term "SYCL" although we may be referring to "DPC++".
# Source environments
source /opt/intel/oneapi/setvars.sh
# We'll be using oneAPI's distribution of conda and Python
# Python 3.6+ will work
conda create -n sycl python=3.10
conda activate sycl
which icx # /opt/intel/oneapi/compiler/<version>/linux/bin/icx
which icpx # /opt/intel/oneapi/compiler/<version>/linux/bin/icpx
which python # ${HOME}/.conda/envs/sycl/bin/python
python --version # Python 3.10.0 :: Intel Corporation
cmake -DBUILD_SYCL_MODULE=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DBUILD_UNIT_TESTS=ON ..
make -j$(nproc)
# C++ test
make tests -j$(nproc)
./bin/tests --gtest_filter="*SYCLDemo*"
# C++ example
make SYCLDemo -j$(nproc)
./bin/examples/SYCLDemo
# Python
make install-pip-package -j$(nproc)
pytest ../python/test/core/test_sycl_utils.py -s
After activating the SYCL environment, you may run sycl-ls to list available
SYCL devices, for example:
$ sycl-ls
[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM)
[opencl:cpu:1] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i9-12900K
[opencl:gpu:2] Intel(R) OpenCL HD Graphics, Intel(R) UHD Graphics 770
[ext_oneapi_level_zero:gpu:0] Intel(R) Level-Zero, Intel(R) UHD Graphics 770
[host:host:0] SYCL host platform, SYCL host device
Open3D is designed to make use of the SYCL GPU devices.
core::Device("SYCL:0") maps the default SYCL GPU returned by
sycl::gpu_selector().
ext_oneapi_level_zero:gpu:0 in the
example above) backend will be used by default instead of the "OpenCL GPU"
(opencl:gpu:2 in the example above).SYCL:0 will fall back to the SYCL host device.
The SYCL host device is used for debugging only.BUILD_CUDA_MODULE=OFFGLIBCXX_USE_CXX11_ABI=ONset(CMAKE_CXX_STANDARD 17)To make pip install open3d works out-of-the box on SYCL-enabled platforms,
we can utilize runtime libraries released via PyPI. This feature needs to be
implemented.
User:
Libraries: