MCDC icon indicating copy to clipboard operation
MCDC copied to clipboard

Outside GPU libraries for GPU functions

Open jpmorgan98 opened this issue 1 year ago • 2 comments

As we start to integrate more advanced hybrid methods on the GPU we are finding that most numpy functions are not supported on the GPU. I think we have two options here (1) reimplement all operations (gemm, LU decomp, etc.) in our own python-numba functions or (2) use CuPy supposed interoperability allowing for zero-overhead copy.

I think 2 is the way to go but would probably require an object mode call to work which is way less then ideal. This is related to #158 and how best to store data with the Cupy array potentially being the way to go.

jpmorgan98 avatar Feb 28 '24 19:02 jpmorgan98

Actually I think we should be able to call into CUDA libraries (i.e. cusolver etc.). I believe this is done by pulling things from nvvm. This would be the most seamless thing to do I think and could allow for some from_cpu from_gpu` stuff. This could also eliminate the need to reimplement things like GEMRES as cuda libraries are already written that do that.

More investigation is required tho. This idea came from looking at numba.cuda.tests. Also of interest on this front might be the pyculib package from numba.

jpmorgan98 avatar Feb 28 '24 22:02 jpmorgan98

Has this been resolved, @jpmorgan98 ?

ilhamv avatar Feb 10 '25 04:02 ilhamv