Activate the debugger and compiler:
export ONEAPI_ROOT=/path/to/oneapi source $ONEAPI_ROOT/debugger/latest/env/vars.sh
Create and activate conda environment with the installed numba-dpex:
conda create numba-dpex-dev numba-dpex conda activate numba-dpex-dev
Activate NEO drivers (optional).
If you want to use the local NEO driver, activate the variables for it. See the :ref:`NEO-driver`.
Check debugging environment.
You can check the correctness of the work with the following example:
.. literalinclude:: ./../../../../numba_dpex/examples/debug/simple_sum.py :lines: 5- :linenos: :lineno-match:Launch the Intel® Distribution for GDB* and set a breakpoint in the kernel:
$ gdb-oneapi -q --args python simple_sum.py (gdb) break simple_sum.py:22 No source file named simple_sum.py. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (simple_sum.py:22) pending. (gdb) run
In the output you can see that the breakpoint was hit successfully:
Thread 2.2 hit Breakpoint 1, with SIMD lanes [0-7], __main__::data_parallel_sum () at simple_sum.py:22 22 i = dpex.get_global_id(0) (gdb) continue Done... ...