- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Labels
Description
Cupy provides GPU enabled sparse matrix implementation that has similar APIs to scipy.sparse.
I believe that only a slight modification makes sparse compatible to cupyx.scipy.sparse
.
Is it in the scope of sparse's development?
The most significant problem I believe is how to prepare a testing framework. Travis does not provide gpu instance.
It looks that Cupy's development team has their own server for testing.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
hameerabbasi commentedon Oct 14, 2018
The problem I have with this approach is that I do not have a CUDA GPU I can use for testing currently. Therefore, maintaining and testing any
cupy
-specific parts will be close to impossible for me.I can accept PRs if and only if they do not contain any
cupy
specific code. The reason isn't the unwillingness to have it; it's the inability to maintain it.fujiisoup commentedon Oct 14, 2018
Thanks, @hameerabbasi.
How about to enable the use of general
scipy.sparse
-like arrays (and alsonp.ndarray
-like array) in sparse?I think it would have done connection to #86, when we may want sparse stay that had similar api to scipy's sparse.
For API, I am thinking if we could do with the context manager, like
which uses
cupy.ndarray
andcupyx.scipy.sparse
instead ofnumpy
andscipy.sparse
, respectively.hameerabbasi commentedon Oct 15, 2018
I'm currently using Numba for some of the calculations on the NumPy. If Numba doesn't properly support these NumPy-ish arrays, then we run into issues.
I guess we could add this context and only test against NumPy specifically. We would also need to check if the contexts are all the same during a calculation.
I guess my point is it would quickly turn complicated, with very little chance left for me to support it. That said, I'm willing to give it a try if we can have a solid CI setup at the very least.
fujiisoup commentedon Oct 15, 2018
Numba does not support Cupy...
OK. It looks the GPU support is a little further away than I expected.
Thanks for the information.
jakirkham commentedon May 30, 2019
IIUC Sparse makes use of NumPy arrays to hold the coordinates and data as well as uses it for computation, correct? If so, I wonder to what extent protocols like NEP 18 can get us where we want to go here.
jakirkham commentedon May 30, 2019
As a follow-up on this point, you might find this doc interesting. 🙂
crumleyc commentedon Mar 3, 2020
I am currently in a situation where I have a sparse 1D vector and I have been using sparse.COO. Now I have moved to a GPU server and have been implementing cupy. It seems on y'all's site that cupy integration is in the future, but not yet. I have looked into cupyx.scipy.sparse.coo_matrix but it doesn't support 1D vectors. Ideas? The other matrix and vector are cupy, so I'd like to find some answer that results in a cupy compatible array because then I can still use the gpu for this one operation.