numba-dpex
numba-dpex copied to clipboard
numpy sum operator (axis) isn't supported
Running into this issue when implementing l2_norm into dpebench:
Here is the code:
@nb.njit(parallel=False, fastmath=True)
def l2_norm(a, d):
sq = np.square(a)
sum = sq.sum(axis=1)
d[:] = np.sqrt(sum)
Here is the error:
KeyError: "Failed in dpex_nopython mode pipeline (step: Rewrite name of Numpy functions to overload already overloaded function)\n'attr'"
It seems axis isn't supported at this moment.
There are two issues here:
- Parfor does not support
sum
with theaxis
keyword. - GPU kernel generation for reductions is not yet supported.
@DrTodd13 can you take a look at the first point?