diff options
author | Andrew Harp <andrew.harp@gmail.com> | 2018-01-29 13:19:44 -0500 |
---|---|---|
committer | Andrew Harp <andrew.harp@gmail.com> | 2018-01-29 13:19:44 -0500 |
commit | 7d5d52ea1aa3ed78e14a379d645922b58e94422c (patch) | |
tree | 6cc3668190ce4c07158ba8f2ddeea43dd02179c4 /tensorflow/contrib/mpi_collectives | |
parent | f7cbb757cf51143a1c7d9db5a812ac165941adf4 (diff) | |
parent | 197f573f3bd830bbc4dc277e7c8b8cfaca65e14a (diff) |
Fixing merge conflicts
Diffstat (limited to 'tensorflow/contrib/mpi_collectives')
-rw-r--r-- | tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py b/tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py index f0a116239d..2fbefef0d3 100644 --- a/tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py +++ b/tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py @@ -26,7 +26,8 @@ from tensorflow.python.framework import ops from tensorflow.python.platform import resource_loader _mpi_ops_so = loader.load_op_library( - resource_loader.get_path_to_datafile("_mpi_ops.so")) + resource_loader.get_path_to_datafile('_mpi_ops.so')) + def size(name=None): """An op which returns the number of MPI processes. @@ -120,15 +121,14 @@ def allgather(tensor, name=None): """ # Specify that first allgather is to collect the tensor gather sizes, # indicated by passing in a scalar (0-D tensor) of value 0 - sizes_flag = tf.constant(0, dtype=tf.int64, name="size_flag_const") - my_size = tf.slice(tf.shape(tensor, out_type=tf.int64), [0], [1], name="size_slice") + sizes_flag = tf.constant(0, dtype=tf.int64, name='size_flag_const') + my_size = tf.slice( + tf.shape(tensor, out_type=tf.int64), [0], [1], name='size_slice') if name is None: - name = "allgather" - sizing_name = "{}_sizing".format(name) + name = 'allgather' + sizing_name = '{}_sizing'.format(name) sizes = gen_mpi_ops.mpi_allgather(my_size, sizes_flag, name=sizing_name) return gen_mpi_ops.mpi_allgather(tensor, sizes, name=name) ops.NotDifferentiable('MPIAllgather') - - |