MCPcopy Create free account
hub / github.com/OAID/Tengine / UnbindNodeOps

Method UnbindNodeOps

driver/cpu/cpu_runner.cpp:725–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725bool CPURunner::UnbindNodeOps(Subgraph* sub_graph)
726{
727 std::vector<Node*>& seq_nodes = sub_graph->seq_nodes;
728
729 for(unsigned int i = 0; i < seq_nodes.size(); i++)
730 {
731 Node* node = seq_nodes[i];
732
733 if(!node->ExistAttr(ATTR_NODE_OPS))
734 continue;
735
736 NodeOps* node_ops = any_cast<NodeOps*>(node->GetAttr(ATTR_NODE_OPS));
737
738 node_ops->OnUnbind(node);
739
740 node_ops->Release();
741
742 node->RemoveAttr(ATTR_NODE_OPS);
743 }
744
745 return true;
746}
747
748bool CPURunner::OptimizeGraph(Subgraph* optimized_graph)
749{

Callers

nothing calls this directly

Calls 6

OnUnbindMethod · 0.80
RemoveAttrMethod · 0.80
sizeMethod · 0.45
ExistAttrMethod · 0.45
GetAttrMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected