Hi!
I am using sparse tensors and need to perform a matrix multiplication using csr format but have not been able to do so as it appears as if it wasn’t implemented. I attach below my code and the error that I get. Interestingly enough if I use tensors in a coo format I don’t have this issue at all. Does anyone know what could be causing this issue?
i = [[1, 0], [1, 0]]
v = [1,1]
spm = torch.sparse_coo_tensor(i, v, torch.Size([2,2]), dtype=torch.float).to_sparse_csr()
m = torch.ones(2,2, requires_grad=True, dtype=torch.float)
a = torch.mm(spm, m)
l = torch.sum(a**2)
l.backward()


image1562×828 139 KB