pytorch_sparse
pytorch_sparse copied to clipboard
out optional argument for sparse-sparse matrix multiplication
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,
I'm sorry for missing this issue. Are you still interested in contributing?