Skip to content

Commit ff8ce53

Browse files
committed
Merge remote-tracking branch 'origin/chienchin/ft_init_device_mesh' into chienchin/ft_init_device_mesh
2 parents 5e2466a + aadf67c commit ff8ce53

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

torchft/process_group_test.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
import torch.distributed as dist
1515
from torch import nn
1616
from torch._C._distributed_c10d import (
17+
_resolve_process_group,
1718
AllgatherOptions,
1819
AllreduceOptions,
1920
BroadcastOptions,
2021
ReduceOp,
21-
_resolve_process_group,
2222
)
2323
from torch.distributed import (
24+
_functional_collectives,
25+
get_world_size,
2426
ReduceOp,
2527
TCPStore,
2628
Work,
27-
_functional_collectives,
28-
get_world_size,
2929
)
3030
from torch.distributed.device_mesh import init_device_mesh
3131
from torch.testing._internal.common_distributed import MultiProcessTestCase
@@ -34,6 +34,7 @@
3434
from torchft.process_group import (
3535
_DummyWork,
3636
_ErrorSwallowingWork,
37+
_ManagedWork,
3738
ErrorSwallowingProcessGroupWrapper,
3839
extend_device_mesh,
3940
ft_init_device_mesh,
@@ -46,10 +47,6 @@
4647
ProcessGroupGloo,
4748
ProcessGroupNCCL,
4849
ProcessGroupWrapper,
49-
_DummyWork,
50-
_ErrorSwallowingWork,
51-
_ManagedWork,
52-
extend_device_mesh,
5350
)
5451

5552

@@ -319,7 +316,6 @@ def setUp(self):
319316
self._spawn_processes()
320317

321318
def test_init_device_mesh(self) -> None:
322-
os.environ["MASTER_ADDR"] = "localhost"
323319
os.environ["MASTER_PORT"] = str(12346)
324320
os.environ["RANK"] = str(self.rank)
325321
os.environ["WORLD_SIZE"] = str(4)

0 commit comments

Comments
 (0)