Add size() method for remote tensors
The last remaining method that we would need to get the forward pass into remote LSTMs is the implementation of the size() method for remote tensors, as described in Pull Request #2160.
This will be complicated as is, because .size() is used in many places to get informations about the current object and not to what it's pointing at. (like torch.save())
Namely we would like to have t.size() == torch.Size([0]) for t = torch.tensor([1, 2, 3, 4]).send(bob) while .shape is used to look at the target object so t.shape == torch.Size([4])
@robert-wagner I'd love to have your view on this point (namely we have a method which could apply for the pointer object AND the point target)
@robert-wagner I'd love to have your view on this point (namely we have a method which could apply for the pointer object AND the point target)
Sorry for the delay in getting back to you on this. I need to adjust my notification preferences for GitHub (I currently get way to many messages to deal with)
My question is why does the size of the pointer matter (what utility do we get out of it? I can definitely see the case for getting the size of the object that it is pointing to but I am not sure what the point of getting the size of the pointer is (other than knowing it is a pointer but in many cases there are better ways to do that)
It is used internally when you're printing Tensors objects for example, so hooking .size() might (and does) break many processes
I'm closing this since I don't see obvious way of fixing this.