This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 5e8ad5c39be1dbdd76ae2b3633323b6b27570cb7 Author: Raja Rathour <[email protected]> AuthorDate: Thu Jan 1 13:37:21 2026 +0530 Commit: Guo Yejun <[email protected]> CommitDate: Mon Jan 12 08:53:42 2026 +0800 avfilter/dnn_backend_torch: implement async execution logic Update execute_model_th to support asynchronous execution by pushing tasks to the pending queue and notifying the worker thread. Signed-off-by: Raja Rathour <[email protected]> Reviewed-by: Wenbin Chen <[email protected]> Reviewed-by: Guo Yejun <[email protected]> --- libavfilter/dnn/dnn_backend_torch.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_torch.cpp b/libavfilter/dnn/dnn_backend_torch.cpp index 166ebf57bf..7c81f0cda2 100644 --- a/libavfilter/dnn/dnn_backend_torch.cpp +++ b/libavfilter/dnn/dnn_backend_torch.cpp @@ -375,14 +375,12 @@ static int execute_model_th(THRequestItem *request, Queue *lltask_queue) goto err; } if (task->async) { - avpriv_report_missing_feature(th_model->ctx, "LibTorch async"); - } else { - ret = th_start_inference((void *)(request)); - if (ret != 0) { - goto err; + std::lock_guard<std::mutex> lock(*th_model->mutex); + if (ff_safe_queue_push_back(th_model->pending_queue, request) < 0) { + return AVERROR(ENOMEM); } - infer_completion_callback(request); - return (task->inference_done == task->inference_todo) ? 0 : DNN_GENERIC_ERROR; + th_model->cond->notify_one(); + return 0; } err: _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
