Skip to content

Commit

Permalink
[CPU] Disabled NotImpelmented exceptions mechanism for generic node.
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanNovoselov committed Aug 26, 2021
1 parent 48c7247 commit 7759570
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
10 changes: 1 addition & 9 deletions inference-engine/src/mkldnn_plugin/mkldnn_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,18 +1166,10 @@ MKLDNNNode* MKLDNNNode::NodesFactory::create(const std::shared_ptr<ngraph::Node>
const MKLDNNExtensionManager::Ptr& extMgr, MKLDNNWeightsSharing::Ptr &w_cache) {
MKLDNNNode *newNode = nullptr;
std::string errorMessage;
try {
{
std::unique_ptr<MKLDNNNode> ol(createNodeIfRegistered(MKLDNNPlugin, Generic, op, eng, w_cache));
if (ol != nullptr && ol->created(extMgr))
newNode = ol.release();
} catch (const InferenceEngine::Exception& ex) {
IE_SUPPRESS_DEPRECATED_START
if (ex.getStatus() != NOT_IMPLEMENTED) {
throw;
} else {
errorMessage += getExceptionDescWithoutStatus(ex);
}
IE_SUPPRESS_DEPRECATED_END
}

if (newNode == nullptr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ bool MKLDNNGenericNode::created(const MKLDNNExtensionManager::Ptr &extMgr) {
extFactory = extMgr->CreateExtensionFactory(ngraphOp);

if (!extFactory)
IE_THROW(NotImplemented);
return false;

std::vector<InferenceEngine::ILayerImpl::Ptr> impls_no_exec;
InferenceEngine::ResponseDesc resp;
InferenceEngine::StatusCode rc = extFactory->getImplementations(impls_no_exec, &resp);
if (rc == InferenceEngine::NOT_IMPLEMENTED) {
IE_THROW(NotImplemented) << resp.msg;
return false;
} else if (rc != InferenceEngine::OK) {
IE_THROW() << resp.msg;
}
Expand All @@ -130,8 +130,7 @@ bool MKLDNNGenericNode::created(const MKLDNNExtensionManager::Ptr &extMgr) {
}
}

if (extFactory || !impls.empty())
setType(Generic);
setType(Generic);
}
return created();
}
Expand Down

0 comments on commit 7759570

Please sign in to comment.