| 689 | bool IsInSubgraph(const string& func_id) { return !func_id.empty(); } |
| 690 | |
| 691 | Status Encapsulator::CopySubgraphNodes( |
| 692 | std::unordered_map<const Node*, Node*>* node_images) { |
| 693 | for (Node* node : graph_in_->op_nodes()) { |
| 694 | string func_id; |
| 695 | TF_RETURN_IF_ERROR(GetFunctionNameAttr(node, &func_id)); |
| 696 | if (!IsInSubgraph(func_id)) continue; |
| 697 | |
| 698 | Subgraph& subgraph = subgraphs_[func_id]; |
| 699 | Node* image = subgraph.MakeNodeImage(graph_in_, node); |
| 700 | image->ClearAttr(group_attribute_); |
| 701 | (*node_images)[node] = image; |
| 702 | } |
| 703 | return Status::OK(); |
| 704 | } |
| 705 | |
| 706 | Status Encapsulator::CopySubgraphEdges( |
| 707 | const std::unordered_map<const Node*, Node*>& node_images, |
nothing calls this directly
no test coverage detected