Cling C++ Interpreter with SYCL extension. The root repository is at https://github.com/root-project/cling
Clone and build SYCL Compiler following this guide
Create a root directory for this project:
mkdir cling && cd cling
Then clone llvm and clang with cling-patches:
git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/clang.git clang
cd clang
git checkout cling-patches
You are now in the clang repository, then run:
cd ..
git clone https://github.com/LongyuYang/Cling-with-SYCL.git cling
Return to the root directory and use cmake to configure the project:
cd ../..
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=. -DCMAKE_BUILD_TYPE=[Release or Debug] ../src
Then build the project:
make -j`nproc`
Add the path that contains libsycl.so
to your $LD_LIBRARY_PATH
environment variable. For instance:
export LD_LIBRARY_PATH=$SYCL_HOME/build/lib:$LD_LIBRARY_PATH
Add OpenCL headers and sycl headers to your $CPLUS_INCLUDE_PATH
environment variable. For instance:
export CPLUS_INCLUDE_PATH=OpenCL-Headers:$SYCL_HOME/llvm/sycl/include:$CPLUS_INCLUDE_PATH
Set the SYCL compiler bin path to $SYCL_BIN_PATH
environment variable. For instance:
export SYCL_BIN_PATH=$SYCL_HOME/build/bin
Lauch cling with -fsycl argument:
cling -fsycl
Cling comes with a Jupyter kernel. After building cling, install Jupyter and cling's kernel by following the README.md in tools/Jupyter. Make sure cling is in your PATH when you start jupyter!