Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
601 Discussions

Unable to stop inside GPU kernel for debugging

Sidarth
Novice
519 Views

I am new to SYCL programming and am trying out the array-transform program from the oneAPI-samples (https://github.com/oneapi-src/oneAPI-samples/tree/master/Tools/ApplicationDebugger/array-transform) and while running the program in gdb-oneapi, I am unable stop inside the kernel. I followed the procedure the setup the debugger and set necessary environment variables. 
Here is the output when I try to stop in a kernel of the array-transform code:

 

 

GNU gdb (Intel(R) Distribution for GDB* 2023.2.0) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.; (C) 2023 Intel Corp.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.

For information about how to find Technical Support, Product Updates,
User Forums, FAQs, tips and tricks, and other support information, please visit:
<http://www.intel.com/software/products/support/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from array-transform...
(gdb) break 54
Breakpoint 1 at 0x4070b3: file /work/snarayanan/save/SYCL/intel_vtune/oneAPI-samples/Tools/ApplicationDebugger/array-transform/src/array-transform.cpp, line 54.
(gdb) run gpu
Starting program: /mounts/work/snarayanan/save/SYCL/intel_vtune/oneAPI-samples/Tools/ApplicationDebugger/array-transform/builds/array-transform gpu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffb2fff640 (LWP 19575)]
[Thread 0x7fffb2fff640 (LWP 19575) exited]
warning: Temporarily disabling breakpoints for unloaded shared library "/lib64/libze_intel_gpu.so.1"
[New Thread 0x7fffb2fff640 (LWP 19576)]
[New Thread 0x7fffb3b42640 (LWP 19577)]
[New Thread 0x7fff9afff640 (LWP 19578)]
[SYCL] Using device: [Intel(R) Data Center GPU Max 1100] from [Intel(R) OpenCL Graphics]
[New Thread 0x7fff997dd640 (LWP 19579)]
success; result is correct.
[Thread 0x7fff997dd640 (LWP 19579) exited]
[Thread 0x7fff9afff640 (LWP 19578) exited]
[Thread 0x7fffb3b42640 (LWP 19577) exited]
[Thread 0x7fffb2fff640 (LWP 19576) exited]
[Inferior 1 (process 19565) exited normally]

 

 

 Line 24 suggest that my break-point inside the kernel is disabled but I am not sure why that is the case (or) how to fix it.

Please let me known what I am missing here.

0 Kudos
1 Reply
Sergey_K_Intel3
Employee
357 Views

In addition to setting the ZET_ENABLE_PROGRAM_DEBUGGING environment variable, please make sure to configure the i915 debug support in Linux kernel as described here:

Get Started with Intel® Distribution for GDB* on Linux* OS Host

 

0 Kudos
Reply