tensorflow/compiler/mlir/xla/transforms/legalize_tf_communication.cc
// Assigns op sharding to an op for a given device core.
Assigns op sharding to an op for a given device core.
Assigns op sharding to an op for a given device core .
void SetOpSharding(Operation* op, int64_t tpu_core) {
  std::string sharding_serialized =
      ::xla::sharding_builder::AssignDevice(tpu_core).SerializeAsString();
  op->setAttr(kShardingAttr,
              StringAttr::get(op->getContext(), sharding_serialized));
}
void SetOpSharding ( Operation * op , int64_t tpu_core ) { std :: string sharding_serialized = :: xla :: sharding_builder :: AssignDevice ( tpu_core ) . SerializeAsString ( ) ; op -> setAttr ( kShardingAttr , StringAttr :: get ( op -> getContext ( ) , sharding_serialized ) ) ; }
Assigns op sharding to an op for a given device core.
Assigns op sharding to an op for a given device core .