This looks quite interesting. Thanks a lot for sharing!
As of right now, since there isn’t a better way to runtime-add functionality to the Tensor class, I’d expect that this is probably fine.
I’d say that for clone and data you probably want to preserve your own Tensor class, instead of it being de-promoted back to Tensor class.
We are working on adding runtime-registerable functions on Tensor class, so that you can declare something like torch.my_fun(Tensor, Tensor) -> Tensor and it be dispatched to your own function. I’m not sure when that will land, hoping for 1.1