Warning: does not synchronize the deque!
(self)
| 220 | self.total += value * n |
| 221 | |
| 222 | def synchronize_between_processes(self): |
| 223 | """ |
| 224 | Warning: does not synchronize the deque! |
| 225 | """ |
| 226 | if not is_dist_avail_and_initialized(): |
| 227 | return |
| 228 | t = torch.tensor([self.count, self.total], dtype=torch.float64, device='cuda') |
| 229 | dist.barrier() |
| 230 | dist.all_reduce(t) |
| 231 | t = t.tolist() |
| 232 | self.count = int(t[0]) |
| 233 | self.total = t[1] |
| 234 | |
| 235 | @property |
| 236 | def median(self): |
nothing calls this directly
no test coverage detected