mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-05 08:24:57 +08:00
reland of https://github.com/pytorch/pytorch/pull/133113 I have to create a new PR because the previous reverted PR could not either be rebased, or imported successfully :( ---- 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/134203 Approved by: https://github.com/tianyu-l
10 lines
300 B
Python
10 lines
300 B
Python
"""
|
|
NOTE: torch.distributed._tensor has been moved to torch.distributed.tensor.
|
|
The imports here are purely for backward compatibility. We will remove these
|
|
imports in a few releases
|
|
|
|
TODO: throw warnings when this module imported
|
|
"""
|
|
|
|
from torch.distributed.tensor._api import * # noqa: F401, F403
|