primeqa.util.transformers_utils.torch_utils.reduce#

primeqa.util.transformers_utils.torch_utils.reduce(hypers: primeqa.util.transformers_utils.hypers_base.HypersBase, tensor, *, op=<ReduceOp.SUM: 0>)#

all reduce the tensor, modifying the tensor :param tensor: the tensor that will be all-reduced :param op: operation to reduce (example: torch.distributed.ReduceOp.SUM) :param check_id: identifier for this call to all_reduce (to check that there is no cross talk) :return: