aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/all_reduce
diff options
context:
space:
mode:
authorGravatar Jacques Pienaar <jpienaar@google.com>2017-10-06 11:03:06 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-06 11:35:46 -0700
commit549e651106e1e582dad0e8a6ea57b8f59ce95067 (patch)
tree132b0716abc9c7f77fd8b08cf88762dc58a87123 /tensorflow/contrib/all_reduce
parent32e044d333e85d535a27a3729ed836855383be1b (diff)
[TF2XLA] Update device name in convert and redo check that name parsing is correct.
* Update ConvertGraphToXla to use the new form for setting the assigned device name. * Remove some stale comments. * Revert workaround that allowed the requested device name to not be parsed. PiperOrigin-RevId: 171314671
Diffstat (limited to 'tensorflow/contrib/all_reduce')
-rw-r--r--tensorflow/contrib/all_reduce/python/all_reduce.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tensorflow/contrib/all_reduce/python/all_reduce.py b/tensorflow/contrib/all_reduce/python/all_reduce.py
index 22d7633ce2..8e7f1791b8 100644
--- a/tensorflow/contrib/all_reduce/python/all_reduce.py
+++ b/tensorflow/contrib/all_reduce/python/all_reduce.py
@@ -762,8 +762,6 @@ def _reduce_non_singleton(input_tensors, red_f, un_op):
if len(input_tensors) > 1:
return red_f(input_tensors)
else:
- if not un_op:
- return input_tensors
output_tensors = []
for t in input_tensors:
with ops.colocate_with(t):
@@ -837,7 +835,7 @@ def _build_shuffle_hybrid(input_tensors, gather_devices, red_op, upper_level_f):
def build_shuffle_then_ring(input_tensors, gather_devices, subdiv,
- red_n_op, red_op, un_op=None):
+ red_n_op, red_op, un_op):
"""Construct hybrid of Shuffle within workers, Ring across workers."""
def upper_builder(tensors):
return build_ring_all_reduce(tensors, len(tensors), subdiv, [0],