MCPcopy Create free account
hub / github.com/TEA-Lab/TwoByTwo / setup

Function setup

src/script/our_train_A.py:38–42  ·  view source on GitHub ↗
(rank, world_size, cfg)

Source from the content-addressed store, hash-verified

36reset = '\033[0m'
37
38def setup(rank, world_size, cfg):
39 os.environ['MASTER_ADDR'] = 'localhost'
40 os.environ['MASTER_PORT'] = '13013'
41 dist.init_process_group("nccl", rank=rank, world_size=world_size)
42 torch.cuda.set_device(rank)
43
44def cleanup():
45 dist.destroy_process_group()

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected