| 436 | } |
| 437 | |
| 438 | NodeDef* MutableGraphView::AddNode(NodeDef&& node) { |
| 439 | auto* node_in_graph = graph()->add_node(); |
| 440 | *node_in_graph = std::move(node); |
| 441 | |
| 442 | AddUniqueNodeOrDie(node_in_graph); |
| 443 | |
| 444 | AddAndDedupFanouts(node_in_graph); |
| 445 | return node_in_graph; |
| 446 | } |
| 447 | |
| 448 | Status MutableGraphView::AddSubgraph(GraphDef&& subgraph) { |
| 449 | // 1. Add all new functions and check that functions with the same name |