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