Skip to content

How to debug SYCLomatic —— use Clion

Tang Jiajun edited this page Feb 28, 2023 · 1 revision

Step 1: make sure the C and C++ Compiler are GCC and G++.

image

Step 2: use Ninja as the Generator and input the CMake options just the same as command line.

image

CMake options: -G Ninja -DCMAKE_INSTALL_PREFIX=/home/tangjiajun/sdb/syclomatic_home/clion-build -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" /home/tangjiajun/sdb/syclomatic_home/SYCLomatic/llvm.

Step 3: Edit Debug Configuration, choose the Target of install-c2s and Excutable of c2s.

image

Program arguments: --no-incremental-migration --out-root=/home/tangjiajun/sdb/syclomatic_home/test /home/tangjiajun/sdb/syclomatic_home/test/test.cu.

More: you can debug clang with this Debug Configuration.

image