class_docstr: Mesh implementation for TPU using SIMD and MPI operations.
class_docstr_tok: ["Mesh","implementation","for","TPU","using","SIMD","and","MPI","operations","."]
docstr: Execute a function in parallel on all slices.
  
  Args:
    fn: a function from tf.Tensors to tf.Tensor or a tuple of tf.Tensors.
    *inputs: a list of inputs.  Each input is either a LaidOutTensor or
      is convertible to a tf.Tensor.
  Returns:
    a LaidOutTensor, or a tuple of LaidOutTensors if fn returns a tuple.
code: def slicewise(self, fn, *inputs):
      """Execute a function in parallel on all slices.
  
      Args:
        fn: a function from tf.Tensors to tf.Tensor or a tuple of tf.Tensors.
        *inputs: a list of inputs.  Each input is either a LaidOutTensor or
          is convertible to a tf.Tensor.
      Returns:
        a LaidOutTensor, or a tuple of LaidOutTensors if fn returns a tuple.
      """
      # convert all inputs to LaidOutTensor where possible
      inputs = mtf.convert_args_to_laid_out_tensors(inputs)
      ret = fn(
          *[
              x.one_slice if isinstance(x, self.LaidOutTensor) else x
              for x in inputs
          ]
      )
      if isinstance(ret, tuple):
          return tuple([self.LaidOutTensor([t]) for t in ret])
      else:
          return self.LaidOutTensor([ret])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import gin
  from mesh_tensorflow import ops_with_redefined_builtins
  from mesh_tensorflow import tpu_variables
  from mesh_tensorflow import utils
  from six.moves import xrange
  import tensorflow.compat.v1
  from tensorflow.python.tpu.ops import tpu_ops
label_desc: Use image node_id 12 for calling the SimdMeshImpl obj's underlying member method code with example usage: obj.slicewise(fn) and returns: tuple, self