Warning: does not synchronize the deque!
(self)
| 55 | self.total += value * n |
| 56 | |
| 57 | def synchronize_between_processes(self): |
| 58 | """ |
| 59 | Warning: does not synchronize the deque! |
| 60 | """ |
| 61 | if not is_dist_avail_and_initialized(): |
| 62 | return |
| 63 | t = torch.tensor([self.count, self.total], dtype=torch.float64, device='cuda') |
| 64 | dist.barrier() |
| 65 | dist.all_reduce(t) |
| 66 | t = t.tolist() |
| 67 | self.count = int(t[0]) |
| 68 | self.total = t[1] |
| 69 | |
| 70 | @property |
| 71 | def median(self): |
nothing calls this directly
no test coverage detected