Skip to content

dnn: use OpenVINO 2021.4 defines#20325

Merged
opencv-pushbot merged 3 commits intoopencv:3.4from
alalek:dnn_openvino_2021.4.0
Jun 30, 2021
Merged

dnn: use OpenVINO 2021.4 defines#20325
opencv-pushbot merged 3 commits intoopencv:3.4from
alalek:dnn_openvino_2021.4.0

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Jun 29, 2021

https://github.com/openvinotoolkit/openvino/releases/tag/2021.4

previous update #19770

force_builders_only=Custom
build_image:Custom=ubuntu-openvino-2021.4.0:20.04
build_image:Custom Win=openvino-2021.4.0
build_image:Custom Mac=openvino-2021.4.0

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

buildworker:Custom=linux-1
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*
YOLO*:*VINO*:*Infer*:*Layer*:*layer*

build_contrib:Custom Win=OFF
build_examples:Custom Win=OFF

allow_multiple_commits=1

Comment on lines +1018 to +1024
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2021_4)
infRequest.SetCompletionCallback<std::function<void(InferenceEngine::InferRequest, InferenceEngine::StatusCode)>>(
[reqWrapper](InferenceEngine::InferRequest /*request*/, InferenceEngine::StatusCode status)
#else
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@dkurt @ilya-lavrenov Could you please take a look on this replacement of deprecated IInferRequest?

Copy link
Copy Markdown
Member

@dkurt dkurt Jun 30, 2021

Choose a reason for hiding this comment

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

Looks good as for me, thanks!

[](InferenceEngine::IInferRequest::Ptr request, InferenceEngine::StatusCode status)
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2021_4)
infRequest.SetCompletionCallback<std::function<void(InferenceEngine::InferRequest, InferenceEngine::StatusCode)>>(
[reqWrapper](InferenceEngine::InferRequest /*request*/, InferenceEngine::StatusCode status)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • callback here holds reqWrapper
  • infRequest holds callback

We can have multiple problems with this. We don't need to hold request inside callback

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you! Replaced to raw pointer in callback.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Jun 30, 2021

👍

@opencv-pushbot opencv-pushbot merged commit 24983f6 into opencv:3.4 Jun 30, 2021
@alalek alalek mentioned this pull request Oct 15, 2021
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