pytorch
9bcd60f0 - [shard] ShardedTensor Interface (#74695)

Commit
3 years ago
[shard] ShardedTensor Interface (#74695) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/74695 ShardedTensor Interface: 1. Make a ShardedTensorInterface class that is a subclass of torch.Tensor, define basic APIs in ShardedTensorInterface, ShardedTensor is now a subclass of it. 2. By default disable `__torch_dispatch__` in the ShardedTensorInterface, ShardedTensor will use `__torch_function__` for now, subclasses of ShardedTensorInterface can use `__torch_dispatch__` by overriding it 3. remove attribute functions in ShardedTensor and handled them in `__torch_function__` ghstack-source-id: 155141823 (Note: this ignores all push blocking failures!) Reviewed By: pritamdamania87, fduwjj Differential Revision: D35123200 fbshipit-source-id: 04ad48ae373e6f61d48bb3bc83021e97b0721362 (cherry picked from commit 71ad55569146fdd431bb5c81dd2ede4789a56dd6)
Author
Wanchao Liang
Committer
Parents
Loading