| 735 | } |
| 736 | |
| 737 | void 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 | |
| 767 | void SubgraphTask::OnNodeInputTensorReady(Node* node, int input_idx, bool sync_mode) |
| 768 | { |
nothing calls this directly
no test coverage detected