MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / reduce_sum

Function reduce_sum

tensorflow/python/ops/nccl_ops.py:130–146  ·  view source on GitHub ↗

Returns a tensor with the reduce sum across `tensors`. The computation is done with a reduce operation, so only one tensor is returned. Args: tensors: The input tensors across which to sum; must be assigned to GPU devices. Returns: A tensor containing the sum of the input te

(tensors)

Source from the content-addressed store, hash-verified

128
129
130def reduce_sum(tensors):
131 """Returns a tensor with the reduce sum across `tensors`.
132
133 The computation is done with a reduce operation, so only one tensor is
134 returned.
135
136 Args:
137 tensors: The input tensors across which to sum; must be assigned
138 to GPU devices.
139
140 Returns:
141 A tensor containing the sum of the input tensors.
142
143 Raises:
144 LookupError: If context is not currently using a GPU device.
145 """
146 return _apply_reduce('sum', tensors)
147
148
149@ops.RegisterGradient('NcclReduce')

Callers 1

_attentionMethod · 0.50

Calls 1

_apply_reduceFunction · 0.85

Tested by

no test coverage detected