| 93 | } |
| 94 | |
| 95 | bool 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 |