mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
190 B
Python
10 lines
190 B
Python
from torch.distributed.device_mesh import ( # noqa: F401
|
|
_get_device_handle,
|
|
_mesh_resources,
|
|
DeviceMesh,
|
|
init_device_mesh,
|
|
)
|
|
|
|
|
|
__all__ = ["init_device_mesh", "DeviceMesh"]
|