I am adding a native function and having trouble using other utility methods w/in ATen. For example, see this simple native function
This is the quick test I’m using:
import torch
s = torch.sparse.DoubleTensor(
torch.LongTensor([[0,2,0], [0,2,1]]),
torch.FloatTensor([[1,2],[3,4],[5,6]]),
torch.Size([3,3,2]))
s.my_op()
Calling self._sparseDims()
on line 153 works just fine as expected. This function is part of the public API and is dispatched to _sparseDims_sparse
here, which calls _get_sparse_impl
. And _get_sparse_impl
is defined in this header, which is included in the file I’m defining my function in.
So the question is this: what magic am I missing to be able to use the same helper function in the same way in my native op?