forked from oneapi-src/SYCLomatic
-
Notifications
You must be signed in to change notification settings - Fork 1
How to debug SYCLomatic —— use command line
Tang Jiajun edited this page Feb 28, 2023
·
1 revision
Step 1:
Create a folder named syclomatic_home
, then clone SYCLomatic
and create new folders named c2s_install
(to put the output executable files) and build
(to put the build progress files) in it. The file tree maybe like this:
syclomatic_home
|-- build
|-- c2s_install
|-- SYCLomatic
Step 2: Build project:
cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=../c2s_install -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" ../SYCLomatic/llvm
ninja install-c2s
Step 3: Debug c2s (assume cuda file is in “test” folder):
gdb build/bin/c2s
(gdb) set args --out-root=test test/test.cu
(gdb) r