SparseTensorImpl vs TensorImpl

Hello,

Is it necessary to have a SparseTensorImpl for operations that work on sparse tensors and are all ops that are mean to work on Sparse tensors labelled with sparse in RegistrationDeclarations.h

for e.g. does _sparse_addmm take in sparse tensors and return sparse tensors?

Hi, I think you need to check the return type and input parameter type to figure out.
eg. _sparse_addmm
https://github.com/pytorch/pytorch/blob/dc7cd97402791945648372e0b08961b00a4f5d26/aten/src/ATen/native/sparse/SparseTensorMath.cpp#L930
The output of this function is a strided tensor.