message: Split partially_decluster_pass.cc into two namespaces
  This reflects the two reasons why we decluster nodes:
  - To reduce device to host copies
  - To reduce recompilations
  I'm about to add a third so I thought this cleanup made sense.
diff: @@ -26,6 +26,10 @@ limitations under the License.
  namespace tensorflow {
  namespace {
  +
  +bool NotBackedge(const Edge& edge) { return !edge.src()->IsNextIteration(); }
  +
  +namespace reduce_device_to_host_copies {
  Status FindNodesToDecluster(const Graph& graph,
  absl::flat_hash_set<Node*>* result,
  absl::Span<Node* const> post_order) {
  @@ -140,8 +144,6 @@ Status PartiallyDeclusterNode(Graph* graph, Node* n) {
  return Status::OK();
  }
  -bool NotBackedge(const Edge& edge) { return !edge.src()->IsNextIteration(); }
  -
  // Clones nodes to outside their cluster to avoid device-to-host copies. For
  // instance, converts this:
  //
  @@ -168,7 +170,7 @@ bool NotBackedge(const Edge& edge) { return !edge.src()->IsNextIteration(); }
  // where the ===> arrow has a hostmem source and destination and would entail a
  // device to host copy if the source and destination were not in the same XLA
  // cluster.
  -Status PartiallyDeclusterToRemoveDeviceToHostCopies(Graph* graph) {
  +Status PartiallyDeclusterGraph(Graph* graph) {
  // When deciding whether to decluster a particular node, we base our decision
  // on if we've decided that some of its consumers have to be declustered too.
  // Iterating the graph in post-order guarantees that consumers have been
  @@ -206,7 +208,9 @@ Status PartiallyDeclusterToRemoveDeviceToHostCopies(Graph* graph) {
  return Status::OK();
  }
  +} // namespace reduce_device_to_host_copies
  +namespace reduce_recompilation {
  bool IsIntraClusterEdge(const Edge& edge) {
  absl::optional<absl::string_view> src_cluster_name =
  GetXlaClusterForNode(*edge.src());
  @@ -269,7 +273,7 @@ Status MustCompileNode(const Node* n, bool* must_compile) {
  // regress performance in any significant manner. We will have to revisit this
  // algorith with a more complex cost model if this assumption turns out to be
  // incorrect.
  -Status DeclusterNodesToReduceRecompilations(Graph* graph) {
  +Status PartiallyDeclusterGraph(Graph* graph) {
  std::vector<bool> compile_time_const_nodes(graph->num_node_ids());
  TF_RETURN_IF_ERROR(BackwardsConstAnalysis(
  *graph, nullptr, &compile_time_const_nodes, IsIntraClusterEdge));
  @@ -322,7 +326,7 @@ Status DeclusterNodesToReduceRecompilations(Graph* graph) {
  return Status::OK();
  }
  -
  +} // namespace reduce_recompilation
  } // namespace
  Status PartiallyDeclusterPass::Run(
  @@ -334,8 +338,9 @@ Status PartiallyDeclusterPass::Run(
  Graph* graph = options.graph->get();
  - TF_RETURN_IF_ERROR(PartiallyDeclusterToRemoveDeviceToHostCopies(graph));
  - TF_RETURN_IF_ERROR(DeclusterNodesToReduceRecompilations(graph));
  + TF_RETURN_IF_ERROR(
  + reduce_device_to_host_copies::PartiallyDeclusterGraph(graph));
  + TF_RETURN_IF_ERROR(reduce_recompilation::PartiallyDeclusterGraph(graph));
  return Status::OK();
  }
  