()
| 37 | |
| 38 | |
| 39 | def synchronize(): |
| 40 | if not dist.is_available(): |
| 41 | return |
| 42 | |
| 43 | if not dist.is_initialized(): |
| 44 | return |
| 45 | |
| 46 | world_size = dist.get_world_size() |
| 47 | |
| 48 | if world_size == 1: |
| 49 | return |
| 50 | |
| 51 | dist.barrier() |
| 52 | |
| 53 | |
| 54 | def get_world_size(): |
nothing calls this directly
no test coverage detected