MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MoveOutgoingEdges

Function MoveOutgoingEdges

tensorflow/compiler/jit/build_xla_ops_pass.cc:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62};
63
64void MoveOutgoingEdges(Graph* g, Node* old_node, Node* new_node) {
65 std::vector<const Edge*> out_edges(old_node->out_edges().begin(),
66 old_node->out_edges().end());
67 for (const Edge* edge : out_edges) {
68 // TODO(sanjoy): This does not update NodeDef inputs. To be able to update
69 // NodeDef inputs we first need to fix encapsulate_subgraphs_pass to fix up
70 // the NodeDef inputs to the function call nodes.
71 g->AddEdge(new_node, edge->src_output(), edge->dst(), edge->dst_input());
72 g->RemoveEdge(edge);
73 }
74}
75
76// Returns a data value that is dead iff `control` is dead.
77Output ControlToData(const Scope& scope, Node* control) {

Callers 1

Calls 7

beginMethod · 0.45
endMethod · 0.45
AddEdgeMethod · 0.45
src_outputMethod · 0.45
dstMethod · 0.45
dst_inputMethod · 0.45
RemoveEdgeMethod · 0.45

Tested by

no test coverage detected