Changed code which check newAPI flag from Core (#10080)

* Changed code which check newAPI flag from Core

* Fixed typo
This commit is contained in:
Ilya Churaev
2022-02-03 10:36:23 +03:00
committed by GitHub
parent 9219242dbd
commit 03c38ca3fd
9 changed files with 48 additions and 19 deletions

View File

@@ -792,7 +792,10 @@ void HeteroExecutableNetwork::Export(std::ostream& heteroModel) {
IInferRequestInternal::Ptr HeteroExecutableNetwork::CreateInferRequestImpl(
const std::vector<std::shared_ptr<const ov::Node>>& inputs,
const std::vector<std::shared_ptr<const ov::Node>>& outputs) {
if (!this->_plugin || !this->_plugin->GetCore() || !this->_plugin->GetCore()->isNewAPI())
if (!this->_plugin)
return nullptr;
const auto& core = _plugin->GetCore();
if (!core || !core->isNewAPI())
return nullptr;
HeteroInferRequest::SubRequestsList inferRequests;
int index = 0;