references/classification/utils.py
def synchronize_between_processes(self):
        """
        Warning: does not synchronize the deque!
        """
        if not is_dist_avail_and_initialized():
            return
        t = torch.tensor([self.count, self.total], dtype=torch.float64, device='cuda')
        dist.barrier()
        dist.all_reduce(t)
        t = t.tolist()
        self.count = int(t[0])
        self.total = t[1]
def synchronize_between_processes(self):
        """
        Warning: does not synchronize the deque!
        """
        if not is_dist_avail_and_initialized():
            return
        t = torch.tensor([self.count, self.total], dtype=torch.float64, device='cuda')
        dist.barrier()
        dist.all_reduce(t)
        t = t.tolist()
        self.count = int(t[0])
        self.total = t[1]
def synchronize_between_processes ( self ) : if not is_dist_avail_and_initialized ( ) : return t = torch . tensor ( [ self . count , self . total ] , dtype = torch . float64 , device = 'cuda' ) dist . barrier ( ) dist . all_reduce ( t ) t = t . tolist ( ) self . count = int ( t [ 0 ] ) self . total = t [ 1 ]
Warning: does not synchronize the deque!
Warning : does not synchronize the deque!