cms-patatrack / pixeltrack-standalone

Standalone Patatrack pixel tracking
Apache License 2.0
17 stars 35 forks source link

[SYCL] Add SYCL implementation #387

Closed AuroraPerego closed 1 year ago

AuroraPerego commented 1 year ago

Implementation for the SYCL/oneAPI backend based on cuda with some inspiration taken from alpaka.

The SYCL implementation can be compiled with dpcpp or with clang++. The latter is the default since it supports the CUDA backend. To compile with dpcpp set USE_SYCL_ONEAPI=1. In this case TBB from oneAPI is used and it's not cloned as an external.

make environment
source env.sh
make -j `nproc` sycl

The device(s) can be chosen at runtime with --device:

Some changes (e.g. different kernels on CPU and GPU, shared variables...) are due to bugs in SYCL and can be reverted when those will be solved (marked with SYCL_BUG_).

NOTE: the line 155 of src/sycl/plugin-PixelVertexFinding/gpuClusterTracksIterative.h has been commented due to a bug in the compiler, so gpuClusterTracksIterative cannot be used

Regarding performance, a comparison on a NVIDIA GPU with native CUDA has been carried out, showing that there is still a lot of work to do to reach the performance of native CUDA.

More details on what has been changed and on the performance are available here

makortel commented 1 year ago

At this stage probably best to just merge as it is