MKLDNN nodes factory improvements (#2252)

This commit is contained in:
Vladislav Volkov
2020-09-30 11:31:19 +03:00
committed by GitHub
parent fecc7eac90
commit 8f1ee05385
17 changed files with 110 additions and 95 deletions

View File

@@ -482,7 +482,7 @@ TEST_F(MKLDNNGraphGenericTests, canGetPrimitiveDescriptorsList) {
mkldnn::engine eng(mkldnn::engine(mkldnn::engine::kind::cpu, 0));
MKLDNNPlugin::MKLDNNWeightsSharing::Ptr cache;
node.reset(MKLDNNPlugin::MKLDNNNode::CreateNode(layerPtr, eng, extMgr, cache));
node.reset(MKLDNNPlugin::MKLDNNNode::factory().create(layerPtr, eng, extMgr, cache));
ASSERT_EQ(MKLDNNPlugin::Type::Generic, node->getType());
ASSERT_NO_THROW(node->getSupportedDescriptors());

View File

@@ -24,7 +24,7 @@ TEST_F(MKLDNNGraphReorderTests, cannotCreatePrimitiveDescriprorsWithoutOtherLaye
InferenceEngine::CNNLayerPtr layer(new InferenceEngine::CNNLayer({"TestReorder", "Reorder", InferenceEngine::Precision::FP32}));
MKLDNNPlugin::MKLDNNWeightsSharing::Ptr cache;
node.reset(MKLDNNPlugin::MKLDNNNode::CreateNode(layer, eng, {}, cache));
node.reset(MKLDNNPlugin::MKLDNNNode::factory().create(layer, eng, {}, cache));
ASSERT_EQ(MKLDNNPlugin::Type::Reorder, node->getType());
ASSERT_THROW(node->getSupportedDescriptors(), InferenceEngine::details::InferenceEngineException);

View File

@@ -33,7 +33,7 @@ protected:
TEST_F(MKLDNNPrimitiveTest, DISABLED_canDeleteWeightInweitableLayer) {
//simulate how convlayer gets created
engine e(engine::cpu, 0);
//auto node = MKLDNNPlugin::MKLDNNNodePtr(MKLDNNPlugin::MKLDNNNode::CreateNode(MKLDNNPlugin::Generic, InferenceEngine::Precision::FP32, ""));
//auto node = MKLDNNPlugin::MKLDNNNodePtr(MKLDNNPlugin::MKLDNNNode::factory().create(MKLDNNPlugin::Generic, InferenceEngine::Precision::FP32, ""));
// ChildConv *conv = new ChildConv(e);
// EXPECT_CALL(*conv, die()).Times(1);