message: Allow enable_auto_xla_input_sharding=true and enable_variable_deduplication=true for single core models.
  If num_cores_per_replica==1, XLA won't split the model across multiple cores making enable_auto_xla_input_sharding effectively a no-op.
diff: @@ -1584,13 +1584,17 @@ Status TPUPartitionedCallOp::ReplaceResourceArgsWithVarHandleOps(
  // partitioning. It is possible that it could be supported in the future.
  const bool enable_variable_deduplication =
  runtime_params_.enable_variable_deduplication;
  - if (enable_spmd_xla_partitioning && enable_variable_deduplication) {
  + if (enable_spmd_xla_partitioning && num_cores_per_replica > 1 &&
  + enable_variable_deduplication) {
  // If enable_spmd_xla_partitioning is true, the user set the
  // enable_auto_xla_input_sharding flag. Warn them that only one of the flags
  - // can be set safely.
  + // can be set safely when num_cores_per_replica > 1. If
  + // num_cores_per_replica==1, enable_spmd_xla_partitioning is effectively a
  + // no-op so we can skip this check.
  return errors::InvalidArgument(
  - "The following flags are incompatible: enable_auto_xla_input_sharding "
  - "and enable_variable_deduplication. Only enable one of the flags.");
  + "The following flags are incompatible when num_cores_per_replica > 1: "
  + "enable_auto_xla_input_sharding and enable_variable_deduplication. "
  + "Only enable one of the flags.");
  }
  std::vector<Node*> tpu_resource_args;
  std::vector<int> arg_indices;
  