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

Method DevPrerun

executor/lib/node_dev_executor.cpp:95–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool NodeExecutor::DevPrerun(void* graph_handle)
96{
97 NodeContext* context = reinterpret_cast<NodeContext*>(graph_handle);
98 Subgraph* graph = context->optimized_graph;
99
100 for(unsigned int i = 0; i < graph->seq_nodes.size(); i++)
101 {
102 Node* node = graph->seq_nodes[i];
103 Operator* op = node->GetOp();
104
105 if(op->GetName() == "Const" || op->GetName() == "Input")
106 continue;
107
108 node->SetAttr("DEV_RUN", true);
109
110 if(!backend_dev_->Prerun(context->dev_context, node))
111 return false;
112 }
113
114 return true;
115}
116
117/*
118 This interface MUST be a non-block one, and work with call back

Callers

nothing calls this directly

Calls 5

GetOpMethod · 0.80
GetNameMethod · 0.80
sizeMethod · 0.45
SetAttrMethod · 0.45
PrerunMethod · 0.45

Tested by

no test coverage detected