MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / synchronize

Function synchronize

slowfast/utils/distributed.py:138–150  ·  view source on GitHub ↗

Helper function to synchronize (barrier) among all processes when using distributed training

()

Source from the content-addressed store, hash-verified

136
137
138def synchronize():
139 """
140 Helper function to synchronize (barrier) among all processes when
141 using distributed training
142 """
143 if not dist.is_available():
144 return
145 if not dist.is_initialized():
146 return
147 world_size = dist.get_world_size()
148 if world_size == 1:
149 return
150 dist.barrier()
151
152
153@functools.lru_cache()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected