Add nb_output property to TaskItem for use in TensorFlow backend and Native backend.
Unified · Split
| @@ -35,6 +35,7 @@ typedef struct TaskItem { · 34 unmodified lines | |||
| 35 | const char **output_names; | 35 | const char **output_names; |
| 36 | int async; | 36 | int async; |
| 37 | int do_ioproc; | 37 | int do_ioproc; |
| 38 | uint32_t nb_output; | ||
| 38 | uint32_t inference_todo; | 39 | uint32_t inference_todo; |
| 39 | uint32_t inference_done; | 40 | uint32_t inference_done; |
| 40 | } TaskItem; | 41 | } TaskItem; |
| @@ -678,6 +678,7 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu · 677 unmodified lines | |||
| 678 | task.in_frame = in_frame; | 678 | task.in_frame = in_frame; |
| 679 | task.output_names = &output_name; | 679 | task.output_names = &output_name; |
| 680 | task.out_frame = out_frame; | 680 | task.out_frame = out_frame; |
| 681 | task.nb_output = 1; | ||
| 681 | task.model = ov_model; | 682 | task.model = ov_model; |
| 682 | 683 | ||
| 683 | if (extract_inference_from_task(ov_model->model->func_type, &task, ov_model->inference_queue, NULL) != DNN_SUCCESS) { | 684 | if (extract_inference_from_task(ov_model->model->func_type, &task, ov_model->inference_queue, NULL) != DNN_SUCCESS) { |
| @@ -798,6 +799,7 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, DNNExecBaseParams * · 114 unmodified lines | |||
| 798 | task.in_frame = exec_params->in_frame; | 799 | task.in_frame = exec_params->in_frame; |
| 799 | task.output_names = &exec_params->output_names[0]; | 800 | task.output_names = &exec_params->output_names[0]; |
| 800 | task.out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame; | 801 | task.out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame; |
| 802 | task.nb_output = exec_params->nb_output; | ||
| 801 | task.model = ov_model; | 803 | task.model = ov_model; |
| 802 | 804 | ||
| 803 | if (extract_inference_from_task(ov_model->model->func_type, &task, ov_model->inference_queue, exec_params) != DNN_SUCCESS) { | 805 | if (extract_inference_from_task(ov_model->model->func_type, &task, ov_model->inference_queue, exec_params) != DNN_SUCCESS) { |
| @@ -845,6 +847,7 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, DNNExecBasePa · 41 unmodified lines | |||
| 845 | task->in_frame = exec_params->in_frame; | 847 | task->in_frame = exec_params->in_frame; |
| 846 | task->output_names = &exec_params->output_names[0]; | 848 | task->output_names = &exec_params->output_names[0]; |
| 847 | task->out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame; | 849 | task->out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame; |
| 850 | task->nb_output = exec_params->nb_output; | ||
| 848 | task->model = ov_model; | 851 | task->model = ov_model; |
| 849 | if (ff_queue_push_back(ov_model->task_queue, task) < 0) { | 852 | if (ff_queue_push_back(ov_model->task_queue, task) < 0) { |
| 850 | av_freep(&task); | 853 | av_freep(&task); |