[DeviceMesh] Rename _device_mesh.py to device_mesh.py to prepare for beta (#114710) (#114991)

Summary:

Same content of changes as https://github.com/pytorch/pytorch/pull/114710

Rename _device_mesh.py to device_mesh.py, update all callsites, adds documentation.
ghstack-source-id: 208980207
exported-using-ghexport

Test Plan: CI.

Reviewed By: wanchaol

Differential Revision: D51629761

Pull Request resolved: https://github.com/pytorch/pytorch/pull/114991
Approved by: https://github.com/wanchaol, https://github.com/fduwjj, https://github.com/fegin
This commit is contained in:
Iris Zhang (PyTorch)
2023-12-02 04:39:41 +00:00
committed by PyTorch MergeBot
parent 0fef82b3df
commit 729ac7317a
34 changed files with 554 additions and 44 deletions

View File

@ -10046,7 +10046,7 @@ class DistributedTest:
"""
world_size = int(os.environ["WORLD_SIZE"])
from torch.distributed._device_mesh import init_device_mesh
from torch.distributed.device_mesh import init_device_mesh
device_mesh = init_device_mesh("cuda", (world_size,))
pg = _get_default_group()