Hi,
I wonder if similar approach implemented in this PR:
Allow libraries that implement array_ufunc to override DUFunc.__c… numba/numba#8995 would work for CUDAUFuncDispatcher
?
The first work on awkward arrays, the latter does not. We want to be able to do the same for both:
>>> import numba as nb
>>> @nb.vectorize()
... def _square(x):
... return x * x
...
>>> _square
<numba._DUFunc '_square'>
we need to add similar functionality to a CUDAUFuncDispatcher
that handles ufunc
s on CUDA
to allow the following:
>>> @nb.vectorize(
... target="cuda",
... )
... def _square_cuda(x):
... return x * x
...
>>> _square_cuda
<numba.cuda.vectorizers.CUDAUFuncDispatcher object at 0x7259f82fa790>
Please, see the issue: `"cuda"` target in numba.vectorize not working correctly? · Issue #3179 · scikit-hep/awkward · GitHub
Thanks,
Ianna