未验证 提交 b8b8c7c9 编写于 作者: A Anatoliy Talamanov 提交者: GitHub

Merge pull request #23884 from TolyaTalamanov:at/fix-async-infer-ov-backend

G-API: Fix async inference for OpenVINO backend #23884

### 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
上级 c982be39
......@@ -1403,8 +1403,10 @@ cv::gimpl::ov::GOVExecutable::GOVExecutable(const ade::Graph &g,
case NodeType::OP:
if (this_nh == nullptr) {
this_nh = nh;
compiled = const_cast<OVUnit&>(ovm.metadata(this_nh).get<OVUnit>()).compile();
m_reqPool.reset(new RequestPool(createInferRequests(compiled.compiled_model, 1)));
const auto &unit = ovm.metadata(this_nh).get<OVUnit>();
compiled = const_cast<OVUnit&>(unit).compile();
m_reqPool.reset(new RequestPool(createInferRequests(
compiled.compiled_model, unit.params.nireq)));
}
else
util::throw_error(std::logic_error("Multi-node inference is not supported!"));
......@@ -1436,6 +1438,7 @@ void cv::gimpl::ov::GOVExecutable::run(cv::gimpl::GIslandExecutable::IInput &in
if (cv::util::holds_alternative<cv::gimpl::EndOfStream>(in_msg))
{
m_reqPool->waitAll();
out.post(cv::gimpl::EndOfStream{});
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册