class_docstr: A class to support adding sharding attributes to Ops.
  
  Use the factory constructors and then call apply_to_tensor:
    Sharding.replicate().apply_to_tensor(tensor)
docstr: Returns a replicated sharding attribute.
  
  This causes an op to be computed in its entirety independently on all
  cores in the XLA device.
docstr_tok: ["Returns","a","replicated","sharding","attribute",".","This","causes","an","op","to","be","computed","in","its","entirety","independently","on","all","cores","in","the","XLA","device","."]
code: def replicate(cls):
      """Returns a replicated sharding attribute.
  
      This causes an op to be computed in its entirety independently on all
      cores in the XLA device.
      """
      return Sharding(
          proto=xla_data_pb2.OpSharding(
              type=xla_data_pb2.OpSharding.REPLICATED
          )
      )
  
imports: import numpy
  from tensorflow.compiler.tf2xla.python import xla
  from local_xla.xla import xla_data_pb2
  from tensorflow.core.framework import attr_value_pb2
label_desc: Use image node_id 2 for calling the Sharding obj's underlying member method code with example usage: obj.replicate(cls) and returns: Sharding