Closed
Description
Setting breakpoint by function name in nested function works incorrectly with Numba-dppy master and Numba 0.54. The breakpoint is hit in place of the function call instead the first line of the nested function.
Numba-dppy version: custom build based on 0.15.0dev1
Numba version: 0.54.rc3
import numpy as np
import numba_dppy as dppy
import dpctl
@dppy.func(debug=True)
def func_sum(a_in_func, b_in_func):
l1 = a_in_func + 10.0
l2 = b_in_func * 0.5
result = l1 + l2
return result, l1, l2, a_in_func, b_in_func
@dppy.kernel(debug=True)
def kernel_sum(a_in_kernel, b_in_kernel, c_in_kernel):
i = dppy.get_global_id(0)
c_in_kernel[i] = func_sum(a_in_kernel[i], b_in_kernel[i])[0]
global_size = 10
a = np.arange(global_size, dtype=np.float32)
b = np.arange(global_size, dtype=np.float32)
c = np.empty_like(a)
with dpctl.device_context("opencl:gpu"):
kernel_sum[global_size, dppy.DEFAULT_LOCAL_SIZE](a, b, c)
print("Done...")
NUMBA_OPT=0 gdb-oneapi -q --args python simple_dppy_func.py
...
(gdb) break func_sum
...
Thread 2.1 hit Breakpoint 1, with SIMD lanes [0-7], 0x00000000fffea4b0 in __main__::func_sum () at simple_dppy_func.py:31
31 c_in_kernel[i] = func_sum(a_in_kernel[i], b_in_kernel[i])[0]
(gdb)
Compared to the previous release. Breakpoint is hit in the first line of nested function:
Numba-dppy version: 0.14.1
Numba version: 0.53.1
NUMBA_OPT=0 gdb-oneapi -q --args python simple_dppy_func.py
...
(gdb) break func_sum
...
Thread 2.1 hit Breakpoint 1, with SIMD lanes [0-7], __main__::func_sum () at simple_dppy_func.py:22
22 l1 = a_in_func + 10.0
(gdb)