Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lavfi/dnn: Error Specificity #438

Closed
wants to merge 17 commits into from

Conversation

shubhanshu02
Copy link
Contributor

@shubhanshu02 shubhanshu02 commented Aug 18, 2021

Patch Set Description

This patchset improves the error specificity on all the patchsets from the GSoC project Async Support for TensorFlow Backend in FFmpeg.

Objective: Return Specific Error codes from the DNN Backend Functions

Parts under this deliverable

  • Add DNN_GENERIC_ERROR for errors related to the backend framework API-related errors.
  • Use error codes from libavutil/error.c

Patches

41b1512 libavfilter: Prepare to handle specific error codes in DNN Filters
9f53605 lavfi/dnn: Error Specificity in Native Backend Layers
c3a2fe2 lavfi/dnn_io_proc: Return Specific Error Codes
9e219b7 lavfi/dnn_backend_openvino: Return Specific Error Codes
4a498ac lavfi/dnn_backend_tf: Return Specific Error Codes
ec471f7 lavfi/dnn_backend_native: Return Specific Error Codes
605cccb lavfi/dnn_backend_common: Return specific error codes

@shubhanshu02 shubhanshu02 force-pushed the errspecificity branch 2 times, most recently from bea2aa5 to 4479052 Compare September 3, 2021 14:06
@uartie
Copy link
Collaborator

uartie commented Sep 15, 2021

Checks passed. Any reviews needed? If not, is it ready for upstream so we can close this?

@shubhanshu02
Copy link
Contributor Author

@guoyejun sir?

@guoyejun
Copy link
Collaborator

sorry for the missing, I might need several other weeks to start the review.

@shubhanshu02
Copy link
Contributor Author

No problem. Shall I close this PR for now or keep it open?

…nput

This commit rearranges the existing code to create a separate functions
for filling native model operands with execution data.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This commit rearranges the existing code to create two separate functions
for the completion callback of execution.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This commit defines NativeRequestItem for the Native Backend and also
adds a function to copy operands from the Native Model, to be
used for creating DnnOperands in NativeRequestItem.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This patch changes the current synchronous execution in the Native Backend
to use NativeRequestItem and separate set of operands from the request, which will
help in implementing asynchronous execution.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This patch introduces a separate function to execute the
NativeRequestItem and free its operands.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
The patch adds the documentation for the newly created functions
for NativeRequestItems in the Native backend.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This patch adds async support to the Native Backend by
executing the NativeRequestItem on detached threads.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Switch flush frame function to use asynchronous mode of
execution.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Reduce default value of conv2d_threads in Native Backend for
async mode.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Add batch execution to the TensorFlow backend

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This commit prepares the filter side to handle specific error codes
from the DNN backends instead of current DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This commit returns specific error codes from the execution
functions in the Native Backend layers instead of DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
This commit returns specific error codes from the functions in the
dnn_io_proc instead of DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered. For OpenVINO API errors, currently
DNN_GENERIC_ERROR is returned.
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered. For TensorFlow C API errors, currently
DNN_GENERIC_ERROR is returned.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered in the common DNN backend functions.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
@shubhanshu02
Copy link
Contributor Author

shubhanshu02 commented Oct 19, 2021

I saw all occurences of av_mallocz_array() were replaced by av_calloc() in 1ea3650. So corrected and rebased the branch with master.

@uartie uartie closed this Dec 16, 2021
@uartie uartie reopened this Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants