Skip to content

[G-API] Handle errors in IEBackend & modeling tool#21579

Merged
alalek merged 3 commits intoopencv:4.xfrom
TolyaTalamanov:at/handle-errors-in-iebackend
Feb 9, 2022
Merged

[G-API] Handle errors in IEBackend & modeling tool#21579
alalek merged 3 commits intoopencv:4.xfrom
TolyaTalamanov:at/handle-errors-in-iebackend

Conversation

@TolyaTalamanov
Copy link
Copy Markdown
Contributor

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Build configuration

force_builders=Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
build_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

Xbuild_image:Custom=centos:7
Xbuildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

build_image:Custom=ubuntu-openvino-2021.4.1:20.04
build_image:Custom Win=openvino-2021.4.1
build_image:Custom Mac=openvino-2021.4.1

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1

disabled due high memory usage: test_opencl:Custom=ON

test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

Copy link
Copy Markdown
Contributor

@mpashchenkov mpashchenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor

@TolyaTalamanov TolyaTalamanov force-pushed the at/handle-errors-in-iebackend branch from 2077260 to 7089bf4 Compare February 9, 2022 10:40
@dmatveev dmatveev self-assigned this Feb 9, 2022
@dmatveev dmatveev added this to the 4.6.0 milestone Feb 9, 2022
Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

t.run(request);
}

void cv::gimpl::ie::RequestPool::callback(cv::gimpl::ie::RequestPool::Task task,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed a task to fix this mess

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@alalek Could you merge it?

// Let's set the empty one to cause the destruction of a callback.
request.SetCompletionCallback([](){});
m_idle_ids.push(id);
} catch (std::exception& e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const reference

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if (eptrs[i] != nullptr) {
try {
std::rethrow_exception(eptrs[i]);
} catch (std::exception& e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const reference in catch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@alalek CI is green

@alalek alalek merged commit 619b6df into opencv:4.x Feb 9, 2022
TolyaTalamanov added a commit to TolyaTalamanov/opencv that referenced this pull request Feb 18, 2022
…in-iebackend

[G-API] Handle errors in IEBackend & modeling tool

* Handle errors in IEBackend & modeling tool

* Handle exceptions in callback

* Add const cv to exception
@alalek alalek mentioned this pull request Feb 22, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…in-iebackend

[G-API] Handle errors in IEBackend & modeling tool

* Handle errors in IEBackend & modeling tool

* Handle exceptions in callback

* Add const cv to exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants