Hi,
I am not sure if that would be possible.
What they do in the link you showed is that they create a torch tensor, convert it, and then fill the numba array in it’s function (which fills also the torch tensor).
You could do a similar thing by having a torch buffer that you convert to numba and then copy your existing numba array into it. This will cost you at most one extra gpu-gpu copy of your tensor. If you can make your function write the result directly into the buffer, then this will work for free.