mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dtensor] move DTensor to public namespace (#133113)
Moving DTensor to be in the public namespace, to formally add the documentation page that includes all the public APIs. This includes: * many path renames and path import fixes * a dedicated doc page without too much content yet (adding in the next PRs) * To preserve the BC for users still using the `torch.distributed._tensor`, I added a shim script to redirect old path calls to the new module The BC preserving is evidented by the fact that all DTensor tests are still working without changing the public imports. So it's safe to land the changes Pull Request resolved: https://github.com/pytorch/pytorch/pull/133113 Approved by: https://github.com/XilunWu ghstack dependencies: #133305, #133306
This commit is contained in:
committed by
PyTorch MergeBot
parent
1a4709cef5
commit
2ee6b97464
@ -27,7 +27,7 @@ from torch.distributed._functional_collectives import AsyncCollectiveTensor
|
||||
if dist.is_available() or TYPE_CHECKING:
|
||||
from torch.distributed import distributed_c10d
|
||||
from torch.distributed._shard.sharded_tensor import ShardedTensor
|
||||
from torch.distributed._tensor import distribute_tensor, DTensor, Replicate
|
||||
from torch.distributed.tensor import distribute_tensor, DTensor, Replicate
|
||||
|
||||
|
||||
def _identity_func(
|
||||
|
Reference in New Issue
Block a user