def create_allgather(self, scalar):
     if not utils.is_scalar(scalar):
         self._raise_input_error()
     self.allgatherer = tnt.Allgatherv(group=self.group,
                                       nelems=1,
                                       algorithm=self.algorithm,
                                       dtype=type(scalar))
Beispiel #2
0
 def create_allreduces(self, scalar):
     if not utils.is_scalar(scalar):
         self._raise_input_error()
     self.allreducer = tnt.Allreduce(group=self.group,
                                     nelems=1,
                                     op=self.reduction_op,
                                     algorithm=self.algorithm,
                                     dtype=type(scalar))
 def wait_for_completion(self, scalar):
     if not utils.is_scalar(scalar):
         self._raise_input_error()
     out = self.allgatherer.wait_for_completion()
     return out
 def start(self, scalar):
     if not utils.is_scalar(scalar):
         self._raise_input_error()
     self.allgatherer.start(scalar)