Skip to content

Commit dcfca09

Browse files
pavanbalajimeta-codesync[bot]
authored andcommitted
For generic tests use Gloo
Summary: NCCLX requires special build flags (-c hpc_comms.use_ncclx=stable), so it's not a good backend for generic tests. Use Gloo instead. Reviewed By: tanquer Differential Revision: D85482073 fbshipit-source-id: 15177b9d2cebe4a53364bd5067cdbd2dfd8ec2ff
1 parent 06b1862 commit dcfca09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

comms/torchcomms/tests/unit/py/test_factory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ def test_factory(self):
2020
os.environ["MASTER_PORT"] = "0"
2121
os.environ["WORLD_SIZE"] = "1"
2222
os.environ["RANK"] = "0"
23+
os.environ["TORCHCOMM_GLOO_HOSTNAME"] = "localhost"
2324

24-
comm = torchcomms.new_comm("ncclx", torch.device("cuda"), "my_comm")
25+
comm = torchcomms.new_comm("gloo", torch.device("cpu"), "my_comm")
2526
comm.finalize()
2627
backend = comm.unsafe_get_backend()
2728
print(backend)
2829

29-
from torchcomms._comms_ncclx import TorchCommNCCLX
30+
from torchcomms._comms_gloo import TorchCommGloo
3031

3132
# if backend was lazily loaded backend will not have the right type
32-
self.assertIsInstance(backend, TorchCommNCCLX)
33+
self.assertIsInstance(backend, TorchCommGloo)
3334

3435
def test_factory_missing(self):
3536
with self.assertRaisesRegex(ModuleNotFoundError, "failed to find backend"):

0 commit comments

Comments
 (0)