A simple SYCL application using CMake building system.
- Cmake 3.22 or above
- One of the following SYCL compilers
- hipSYCL
- DPC++
- Gcc/clang
To configure the project, create a build
directory in the main folder, go inside it and type
cmake .. -DSYCL_BACKEND=[hipSYCL | DPCPP] -DSYCL_DEVICE=[gpu | cpu | host]
If you're using DPCPP, don't forget to set the correct triple for your device using
-DCMAKE_CXX_FLAGS=" -fsycl-targets=YOUR_TRIPLE"
And then build it with:
cmake --build ./ -j=$(nproc)
A file called sample_app
will be placed in the build folder