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

Method OnOutputNodeDone

executor/lib/graph_task.cpp:737–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737void SubgraphTask::OnOutputNodeDone(Node* node, bool sync_mode)
738{
739 int out_tensor_num = node->GetOutputNum();
740
741 for(int i = 0; i < out_tensor_num; i++)
742 {
743 Tensor* out_tensor = node->GetOutputTensor(i);
744
745 for(unsigned int j = 0; j < out_tensor->consumer.size(); j++)
746 {
747 NodePort* port = out_tensor->consumer[j];
748 Node* consumer = port->owner;
749
750 if(!consumer->ExistAttr("consumer_task"))
751 {
752 /*
753 LOG_DEBUG()<<"consumer: "<<consumer->GetName()
754 <<" has no task attached. from node: "
755 <<node->GetName()<<"\n";
756 */
757 continue;
758 }
759
760 SubgraphTask* consumer_task = any_cast<SubgraphTask*>(consumer->GetAttr("consumer_task"));
761
762 consumer_task->OnNodeInputTensorReady(consumer, port->port_index, sync_mode);
763 }
764 }
765}
766
767void SubgraphTask::OnNodeInputTensorReady(Node* node, int input_idx, bool sync_mode)
768{

Callers

nothing calls this directly

Calls 6

GetOutputNumMethod · 0.45
GetOutputTensorMethod · 0.45
sizeMethod · 0.45
ExistAttrMethod · 0.45
GetAttrMethod · 0.45

Tested by

no test coverage detected