Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -432,13 +432,6 @@ static DNNReturnType execute_model_ov(RequestItem *request, Queue *inferenceq) · 431 unmodified lines | |||
| 432 | ctx = &task->ov_model->ctx; | 432 | ctx = &task->ov_model->ctx; |
| 433 | 433 | ||
| 434 | if (task->async) { | 434 | if (task->async) { |
| 435 | if (ff_queue_size(inferenceq) < ctx->options.batch_size) { | ||
| 436 | if (ff_safe_queue_push_front(task->ov_model->request_queue, request) < 0) { | ||
| 437 | av_log(ctx, AV_LOG_ERROR, "Failed to push back request_queue.\n"); | ||
| 438 | return DNN_ERROR; | ||
| 439 | } | ||
| 440 | return DNN_SUCCESS; | ||
| 441 | } | ||
| 442 | ret = fill_model_input_ov(task->ov_model, request); | 435 | ret = fill_model_input_ov(task->ov_model, request); |
| 443 | if (ret != DNN_SUCCESS) { | 436 | if (ret != DNN_SUCCESS) { |
| 444 | return ret; | 437 | return ret; |
| @@ -793,6 +786,11 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, const char *i · 348 unmodified lines | |||
| 793 | return DNN_ERROR; | 786 | return DNN_ERROR; |
| 794 | } | 787 | } |
| 795 | 788 | ||
| 789 | if (ff_queue_size(ov_model->inference_queue) < ctx->options.batch_size) { | ||
| 790 | // not enough inference items queued for a batch | ||
| 791 | return DNN_SUCCESS; | ||
| 792 | } | ||
| 793 | |||
| 796 | request = ff_safe_queue_pop_front(ov_model->request_queue); | 794 | request = ff_safe_queue_pop_front(ov_model->request_queue); |
| 797 | if (!request) { | 795 | if (!request) { |
| 798 | av_log(ctx, AV_LOG_ERROR, "unable to get infer request.\n"); | 796 | av_log(ctx, AV_LOG_ERROR, "unable to get infer request.\n"); |