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

Function GetVarOfIdentity

tensorflow/core/graph/star_server_graph_partition.cc:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68const Node* GetVarOfIdentity(const PartitionOptions& opts,
69 const Node* identity_node) {
70 for (const Edge* in : identity_node->in_edges()) {
71 const Node* src = in->src();
72 if (src->IsVariable() &&
73 opts.node_to_loc(src) ==
74 opts.node_to_loc(identity_node)) {
75 // NOTE(jiankeng.pt): Identity has a control edge,
76 // should consider the other edges.
77 if (in->IsControlEdge()) continue;
78 return src;
79 }
80 }
81 return NULL;
82}
83
84void SubGraph::CompleteVariables(const PartitionOptions& opts) {
85 set<int> var_id_set;

Callers 5

CompleteVariablesMethod · 0.85
IsSplitedIgnoredMethod · 0.85
UseFuseRecvInternalMethod · 0.85
CompleteSubGraphMethod · 0.85
SplitGraphInternalMethod · 0.85

Calls 3

IsVariableMethod · 0.80
srcMethod · 0.45
IsControlEdgeMethod · 0.45

Tested by

no test coverage detected