pytorch_sparse icon indicating copy to clipboard operation
pytorch_sparse copied to clipboard

out optional argument for sparse-sparse matrix multiplication

Open wazizian opened this issue 5 years ago • 1 comments
trafficstars

Hi ! First, thank you for sharing your work! :-)

I am interested in adding an out optional argument for the sparse-sparse multiplication function spspmm. The user could for instance specify two tensors indexOut and ``valueOut", which would store the result.

An application of this is if the sparsity pattern of the result is known beforehand to the user. The user could then specify indexOut which would avoid computing the sparsity pattern and, for the GPU version, would skip the call to cusparseXcsrgemm2Nnz(). Moreover, this could enable the user to skip the computation of some unnecessary coefficients.

The behaviour of spspmm would then be similar to the behavior of the multiplication function of CUSP for instance.

If you are ok, I'd be happy to work on a PR for this :-)

Cheers,

wazizian avatar Aug 28 '20 15:08 wazizian

I'm sorry for missing this issue. Are you still interested in contributing?

rusty1s avatar Sep 16 '21 06:09 rusty1s