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

Method Remove

tensorflow/compiler/jit/shape_inference_helpers.cc:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace tensorflow {
25
26Status BackEdgeHelper::Remove(Graph* graph) {
27 if (graph_ != nullptr) {
28 return errors::Internal("BackEdgeHelper duplicate call to Remove.");
29 }
30 graph_ = graph;
31 for (Node* n : graph_->nodes()) {
32 if (n->IsMerge()) {
33 for (const Edge* e : n->in_edges()) {
34 if (e->src()->IsNextIteration()) {
35 back_edges_.push_back(
36 BackEdge{e, e->src(), e->src_output(), e->dst(), e->dst_input()});
37 }
38 }
39 }
40 }
41 for (const BackEdge& be : back_edges_) {
42 graph_->RemoveEdge(be.edge);
43 }
44 return Status::OK();
45}
46
47const std::vector<BackEdgeHelper::BackEdge>& BackEdgeHelper::RemovedEdges()
48 const {

Callers 1

InferShapesFunction · 0.45

Calls 10

InternalFunction · 0.85
IsMergeMethod · 0.80
IsNextIterationMethod · 0.80
nodesMethod · 0.45
srcMethod · 0.45
push_backMethod · 0.45
src_outputMethod · 0.45
dstMethod · 0.45
dst_inputMethod · 0.45
RemoveEdgeMethod · 0.45

Tested by

no test coverage detected