This section contains information, tips and pointers on debugging SYCL™ applications on various devices.
The host part of a SYCL application can simply be debugged as a C++ application, but kernel debugging support or tooling may vary depending on the device being targeted.
Note
If a SYCL application is generic, it may sometimes be helpful to debug it on devices with better debugging support and tooling such as an Intel® OpenCL™ CPU device, rather than on the actual target device.
Debugging on an Intel OpenCL CPU Device
Documentation regarding debugging a DPC++ application using the Intel OpenCL CPU device can be found in the Debugging the DPC++ and OpenMP* Offload Process section of the Intel oneAPI Programming Guide.
CUDA® Debugger Support
The CUDA Toolkit comes with a debugger cuda-gdb
that can be used to
debug kernels on NVIDIA® GPUs for CUDA applications. cuda-gdb
can also
be used to debug kernels compiled for the DPC++ ext_oneapi_cuda
backend.
There are currently no identified differences between the expected behavior of
cuda-gdb
when used to debug DPC++ compiled kernels with respect to
kernels that are compiled with the NVIDIA nvcc
compiler. Consult the
cuda-gdb
documentation for
details on the correct usage of cuda-gdb
.