Sparse tensor support for slice, reduce sum and element wise comparison?

pytorch has done a great job for normal dense tensor, and I have used it for not only deep learning applications, but also some basic gpu boosted inference task, such as kmeans and tsne.
However, currently the sparse tensor support is not so good. According to my observation, only matrix multiplication and element-wise math operation is supported, while other important functions such as slice and reduce sum is missing.
This cause a lot trouble when we want to use pytorch’s sparse tensor to handle some inference jobs.
Here I have a small project which present a sparseTensor wrapper for slice and reduce sum based on pytorch dense tensor, sparse tensor and some cupy kernels(only for inference, since no graph registration is handled)

If you guys have a plan to implement these features with c code, that would be excellent! since GPU memory is always a big problem when we want to handle some big data task. Would you like to do this soon? Or any long-term plans?

Thanks a lot.

Yes, in the long term we’d like to support more operations on sparse. There is an issue open for slice but I’m sure about reduce sum and elementwise comparision:

Hi, thanks, that’s great!
Looking forward it.