Refactor functional/plugin/conformance/ and functional/plugin/shared/ (#21221)
* Refactor conformance/ folder * Refactor functional/plugin/shared/
This commit is contained in:
1 parent
bbb06c4f76
commit
242336c97f
17 files changed
+69
-105
No files matched your search
+3
-4
@@ -9,7 +9,6 @@
|
||||
namespace {
|
||||
|
||||
using namespace ov::op;
|
||||
using namespace ngraph;
|
||||
using ov::element::Type_t;
|
||||
using namespace ov::tools::subgraph_dumper;
|
||||
|
||||
@@ -17,12 +16,12 @@ class MatcherConfigTest : public SubgraphsDumperBaseTest {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
SubgraphsDumperBaseTest::SetUp();
|
||||
const auto const1 = std::make_shared<v0::Constant>(Type_t::f32, Shape({5, 5}), 1);
|
||||
const auto const2 = std::make_shared<v0::Constant>(Type_t::f32, Shape({5, 5}), 2);
|
||||
const auto const1 = std::make_shared<v0::Constant>(Type_t::f32, ov::Shape({5, 5}), 1);
|
||||
const auto const2 = std::make_shared<v0::Constant>(Type_t::f32, ov::Shape({5, 5}), 2);
|
||||
node = std::make_shared<v1::Add>(const1, const2);
|
||||
}
|
||||
|
||||
std::shared_ptr<Node> node;
|
||||
std::shared_ptr<ov::Node> node;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+15
-15
@@ -12,28 +12,28 @@ namespace {
|
||||
using namespace ov::test::behavior;
|
||||
using namespace ov::test::conformance;
|
||||
|
||||
std::shared_ptr<ngraph::Function> ovGetFunction1() {
|
||||
std::shared_ptr<ov::Model> ovGetFunction1() {
|
||||
const std::vector<size_t> inputShape = {1, 4, 20, 20};
|
||||
const ngraph::element::Type_t ngPrc = ngraph::element::Type_t::f32;
|
||||
const ov::element::Type_t ngPrc = ov::element::Type_t::f32;
|
||||
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShape))};
|
||||
params.front()->set_friendly_name("Param_1");
|
||||
params.front()->get_output_tensor(0).set_names({"input_tensor"});
|
||||
|
||||
auto in2add = ngraph::builder::makeConstant(ngPrc, {1, 4, 1, 1}, std::vector<float>{}, true);
|
||||
auto add = ngraph::builder::makeEltwise(params[0], in2add, ngraph::helpers::EltwiseTypes::ADD);
|
||||
auto relu1 = std::make_shared<ngraph::opset1::Relu>(add->output(0));
|
||||
auto add = ngraph::builder::makeEltwise(params[0], in2add, ov::test::utils::EltwiseTypes::ADD);
|
||||
auto relu1 = std::make_shared<ov::op::v0::Relu>(add->output(0));
|
||||
relu1->get_output_tensor(0).set_names({"relu1"});
|
||||
auto relu2 = std::make_shared<ngraph::opset1::Relu>(add->output(0));
|
||||
auto relu2 = std::make_shared<ov::op::v0::Relu>(add->output(0));
|
||||
relu2->get_output_tensor(0).set_names({"relu2"});
|
||||
|
||||
ngraph::NodeVector results{relu1, relu2};
|
||||
return std::make_shared<ngraph::Function>(results, params, "AddTwoOutputEdges");
|
||||
ov::NodeVector results{relu1, relu2};
|
||||
return std::make_shared<ov::Model>(results, params, "AddTwoOutputEdges");
|
||||
}
|
||||
|
||||
std::shared_ptr<ngraph::Function> ovGetFunction2() {
|
||||
std::shared_ptr<ov::Model> ovGetFunction2() {
|
||||
const std::vector<size_t> inputShape = {1, 4, 20, 20};
|
||||
const ngraph::element::Type_t ngPrc = ngraph::element::Type_t::f32;
|
||||
const ov::element::Type_t ngPrc = ov::element::Type_t::f32;
|
||||
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShape))};
|
||||
params.front()->set_friendly_name("Param_1");
|
||||
@@ -42,17 +42,17 @@ std::shared_ptr<ngraph::Function> ovGetFunction2() {
|
||||
auto split = std::make_shared<ov::op::v1::Split>(params[0], splitAxisOp, 2);
|
||||
|
||||
auto in2add = ngraph::builder::makeConstant(ngPrc, {1, 2, 1, 1}, std::vector<float>{}, true);
|
||||
auto add = ngraph::builder::makeEltwise(split->output(0), in2add, ngraph::helpers::EltwiseTypes::ADD);
|
||||
auto relu1 = std::make_shared<ngraph::opset1::Relu>(add);
|
||||
auto add = ngraph::builder::makeEltwise(split->output(0), in2add, ov::test::utils::EltwiseTypes::ADD);
|
||||
auto relu1 = std::make_shared<ov::op::v0::Relu>(add);
|
||||
|
||||
auto in2mult = ngraph::builder::makeConstant(ngPrc, {1, 2, 1, 1}, std::vector<float>{}, true);
|
||||
auto mult = ngraph::builder::makeEltwise(split->output(1), in2mult, ngraph::helpers::EltwiseTypes::MULTIPLY);
|
||||
auto relu2 = std::make_shared<ngraph::opset1::Relu>(mult);
|
||||
auto mult = ngraph::builder::makeEltwise(split->output(1), in2mult, ov::test::utils::EltwiseTypes::MULTIPLY);
|
||||
auto relu2 = std::make_shared<ov::op::v0::Relu>(mult);
|
||||
|
||||
auto concat = std::make_shared<ngraph::opset1::Concat>(ngraph::OutputVector{relu1->output(0), relu2->output(0)}, 3);
|
||||
auto concat = std::make_shared<ov::op::v0::Concat>(ov::OutputVector{relu1->output(0), relu2->output(0)}, 3);
|
||||
concat->get_output_tensor(0).set_names({"concat"});
|
||||
|
||||
return std::make_shared<ngraph::Function>(concat, params, "SplitAddConcat");
|
||||
return std::make_shared<ov::Model>(concat, params, "SplitAddConcat");
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(ov_infer_request_1, OVInferRequestDynamicTests,
|
||||
|
||||
-1
@@ -9,7 +9,6 @@
|
||||
namespace {
|
||||
using namespace ov::test::behavior;
|
||||
using namespace ov::test::conformance;
|
||||
using namespace ngraph;
|
||||
|
||||
static const std::vector<ov::element::Type> ovElemTypesTemplate = {
|
||||
ov::element::f64,
|
||||
|
||||
-1
@@ -9,7 +9,6 @@
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
using namespace ov::test::conformance;
|
||||
using namespace InferenceEngine::PluginConfigParams;
|
||||
|
||||
namespace {
|
||||
//
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ static const std::vector<std::pair<ov::DiscreteTypeInfo, std::shared_ptr<ov::Mod
|
||||
std::vector<std::pair<ov::DiscreteTypeInfo, std::shared_ptr<ov::Model>>> res;
|
||||
auto opsets = ov::get_available_opsets();
|
||||
auto opGenerator = getOpGeneratorMap();
|
||||
std::set<ngraph::NodeTypeInfo> opsInfo;
|
||||
std::set<ov::NodeTypeInfo> opsInfo;
|
||||
for (const auto& opset_pair : opsets) {
|
||||
std::string opset_version = opset_pair.first;
|
||||
const ov::OpSet& opset = opset_pair.second();
|
||||
|
||||
+2
-2
@@ -390,7 +390,7 @@ std::shared_ptr<ov::Model> generate(const std::shared_ptr<ov::op::v9::Eye> &node
|
||||
batch,
|
||||
ov::element::f32);
|
||||
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(eye)};
|
||||
return std::make_shared<ov::Model>(results, ngraph::ParameterVector{rows}, "Eye");
|
||||
return std::make_shared<ov::Model>(results, ov::ParameterVector{rows}, "Eye");
|
||||
}
|
||||
|
||||
std::shared_ptr<ov::Model> generate(const std::shared_ptr<ov::op::v0::FakeQuantize> &node) {
|
||||
@@ -1566,7 +1566,7 @@ std::shared_ptr<ov::Model> generateBinaryEltwiseLogical(const std::shared_ptr<ov
|
||||
}
|
||||
|
||||
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(eltwise)};
|
||||
return std::make_shared<ov::Model>(results, ngraph::ParameterVector{params}, "BinaryEltwiseLogicalGraph");
|
||||
return std::make_shared<ov::Model>(results, ov::ParameterVector{params}, "BinaryEltwiseLogicalGraph");
|
||||
}
|
||||
|
||||
std::shared_ptr<ov::Model> generateBroadcast(const std::shared_ptr<ov::op::Op> &node) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
protected:
|
||||
std::string device_names;
|
||||
ov::AnyMap _properties;
|
||||
std::shared_ptr<ngraph::Function> fn_ptr;
|
||||
std::shared_ptr<ov::Model> fn_ptr;
|
||||
};
|
||||
|
||||
class MultiDevice_SupportTest : public ov::test::TestsCommon, public testing::WithParamInterface<DevicesNamesAndSupportTuple> {
|
||||
@@ -85,7 +85,7 @@ protected:
|
||||
std::string device_names;
|
||||
bool expected_status;
|
||||
ov::AnyMap _properties;
|
||||
std::shared_ptr<ngraph::Function> fn_ptr;
|
||||
std::shared_ptr<ov::Model> fn_ptr;
|
||||
};
|
||||
|
||||
class MultiDeviceMultipleGPU_Test : public ov::test::TestsCommon, public testing::WithParamInterface<DevicesNames> {
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
protected:
|
||||
std::string device_names;
|
||||
std::vector<std::string> device_lists;
|
||||
std::shared_ptr<ngraph::Function> fn_ptr;
|
||||
std::shared_ptr<ov::Model> fn_ptr;
|
||||
};
|
||||
#define MULTI ov::test::utils::DEVICE_MULTI
|
||||
#define CPU ov::test::utils::DEVICE_CPU
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace ov {
|
||||
namespace test {
|
||||
namespace behavior {
|
||||
|
||||
inline std::shared_ptr<ngraph::Function> getDefaultNGraphFunctionForTheDevice(std::vector<size_t> inputShape = {1, 2, 32, 32},
|
||||
ngraph::element::Type_t ngPrc = ngraph::element::Type_t::f32) {
|
||||
inline std::shared_ptr<ov::Model> getDefaultNGraphFunctionForTheDevice(std::vector<size_t> inputShape = {1, 2, 32, 32},
|
||||
ov::element::Type_t ngPrc = ov::element::Type_t::f32) {
|
||||
return ngraph::builder::subgraph::makeSplitConcat(inputShape, ngPrc);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ inline ov::Core createCoreWithTemplate() {
|
||||
|
||||
class OVClassNetworkTest {
|
||||
public:
|
||||
std::shared_ptr<ngraph::Function> actualNetwork, simpleNetwork, multinputNetwork, ksoNetwork;
|
||||
std::shared_ptr<ov::Model> actualNetwork, simpleNetwork, multinputNetwork, ksoNetwork;
|
||||
|
||||
void SetUp() {
|
||||
SKIP_IF_CURRENT_TEST_IS_DISABLED();
|
||||
@@ -233,7 +233,7 @@ class OVClassSetDevicePriorityConfigPropsTest : public OVPluginTestBase,
|
||||
protected:
|
||||
std::string deviceName;
|
||||
ov::AnyMap configuration;
|
||||
std::shared_ptr<ngraph::Function> actualNetwork;
|
||||
std::shared_ptr<ov::Model> actualNetwork;
|
||||
|
||||
public:
|
||||
void SetUp() override {
|
||||
|
||||
+8
-8
@@ -348,7 +348,7 @@ TEST_P(OVCompiledModelBaseTestOptional, CheckExecGraphInfoBeforeExecution) {
|
||||
}
|
||||
int constCnt = 0;
|
||||
|
||||
std::shared_ptr<const ngraph::Function> getFunction = std::dynamic_pointer_cast<const ngraph::Function>(execGraph);
|
||||
std::shared_ptr<const ov::Model> getFunction = std::dynamic_pointer_cast<const ov::Model>(execGraph);
|
||||
ASSERT_NE(getFunction, nullptr);
|
||||
|
||||
for (const auto& op : getFunction->get_ops()) {
|
||||
@@ -400,7 +400,7 @@ TEST_P(OVCompiledModelBaseTestOptional, CheckExecGraphInfoAfterExecution) {
|
||||
int constCnt = 0;
|
||||
// Store all the layers from the executable graph information represented as CNNNetwork
|
||||
bool hasOpWithValidTime = false;
|
||||
auto getFunction = std::dynamic_pointer_cast<const ngraph::Function>(execGraph);
|
||||
auto getFunction = std::dynamic_pointer_cast<const ov::Model>(execGraph);
|
||||
ASSERT_NE(nullptr, getFunction);
|
||||
|
||||
for (const auto& op : getFunction->get_ops()) {
|
||||
@@ -564,10 +564,10 @@ TEST_P(OVCompiledModelBaseTest, loadIncorrectV10Model) {
|
||||
|
||||
// Create simple function
|
||||
{
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ov::Shape({1, 3, 24, 24}));
|
||||
param1->set_friendly_name("param1");
|
||||
param1->output(0).get_tensor().set_names({"data1"});
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ov::Shape({1, 3, 24, 24}));
|
||||
param2->set_friendly_name("param2");
|
||||
param2->output(0).get_tensor().set_names({"data2"});
|
||||
auto concat = std::make_shared<ov::op::v0::Concat>(OutputVector{param1, param2}, 1);
|
||||
@@ -575,7 +575,7 @@ TEST_P(OVCompiledModelBaseTest, loadIncorrectV10Model) {
|
||||
concat->output(0).get_tensor().set_names({"concat"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(concat);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result}, ngraph::ParameterVector{param1, param2});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result}, ov::ParameterVector{param1, param2});
|
||||
function->get_rt_info()["version"] = int64_t(10);
|
||||
function->set_friendly_name("SimpleConcat");
|
||||
}
|
||||
@@ -587,10 +587,10 @@ TEST_P(OVCompiledModelBaseTest, loadIncorrectV11Model) {
|
||||
|
||||
// Create simple function
|
||||
{
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ov::Shape({1, 3, 24, 24}));
|
||||
param1->set_friendly_name("param1");
|
||||
param1->output(0).get_tensor().set_names({"data1"});
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(element::Type_t::f32, ov::Shape({1, 3, 24, 24}));
|
||||
param2->set_friendly_name("param2");
|
||||
param2->output(0).get_tensor().set_names({"data2"});
|
||||
auto concat = std::make_shared<ov::op::v0::Concat>(OutputVector{param1, param2}, 1);
|
||||
@@ -598,7 +598,7 @@ TEST_P(OVCompiledModelBaseTest, loadIncorrectV11Model) {
|
||||
concat->output(0).get_tensor().set_names({"concat"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(concat);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result}, ngraph::ParameterVector{param1, param2});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result}, ov::ParameterVector{param1, param2});
|
||||
function->get_rt_info()["version"] = int64_t(11);
|
||||
function->set_friendly_name("SimpleConcat");
|
||||
}
|
||||
|
||||
+28
-29
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <exec_graph_info.hpp>
|
||||
#include <openvino/pass/serialize.hpp>
|
||||
#include <ie_ngraph_utils.hpp>
|
||||
#include "base/ov_behavior_test_utils.hpp"
|
||||
#include "common_test_utils/ov_test_utils.hpp"
|
||||
#include "common_test_utils/common_utils.hpp"
|
||||
@@ -76,10 +75,10 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedFunction) {
|
||||
|
||||
// Create simple function
|
||||
{
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param1->set_friendly_name("param1");
|
||||
param1->output(0).get_tensor().set_names({"data1"});
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param2->set_friendly_name("param2");
|
||||
param2->output(0).get_tensor().set_names({"data2"});
|
||||
auto relu = std::make_shared<ov::op::v0::Relu>(param1);
|
||||
@@ -92,8 +91,8 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedFunction) {
|
||||
concat->output(0).get_tensor().set_names({"concat"});
|
||||
auto result2 = std::make_shared<ov::op::v0::Result>(concat);
|
||||
result2->set_friendly_name("result2");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result1, result2},
|
||||
ngraph::ParameterVector{param1, param2});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result1, result2},
|
||||
ov::ParameterVector{param1, param2});
|
||||
function->set_friendly_name("SingleRuLU");
|
||||
}
|
||||
execNet = core->compile_model(function, target_device, configuration);
|
||||
@@ -153,13 +152,13 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedFunction) {
|
||||
TEST_P(OVCompiledGraphImportExportTest, importExportedFunctionParameterResultOnly) {
|
||||
// Create a simple function
|
||||
{
|
||||
auto param = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param->set_friendly_name("param");
|
||||
param->output(0).get_tensor().set_names({"data"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(param);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result},
|
||||
ngraph::ParameterVector{param});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result},
|
||||
ov::ParameterVector{param});
|
||||
function->set_friendly_name("ParamResult");
|
||||
}
|
||||
|
||||
@@ -189,13 +188,13 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedFunctionParameterResultOnl
|
||||
TEST_P(OVCompiledGraphImportExportTest, importExportedFunctionConstantResultOnly) {
|
||||
// Create a simple function
|
||||
{
|
||||
auto constant = std::make_shared<ov::op::v0::Constant>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto constant = std::make_shared<ov::op::v0::Constant>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
constant->set_friendly_name("constant");
|
||||
constant->output(0).get_tensor().set_names({"data"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(constant);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result},
|
||||
ngraph::ParameterVector{});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result},
|
||||
ov::ParameterVector{});
|
||||
function->set_friendly_name("ConstResult");
|
||||
}
|
||||
|
||||
@@ -320,10 +319,10 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedIENetwork) {
|
||||
|
||||
// Create simple function
|
||||
{
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param1->set_friendly_name("param1");
|
||||
param1->output(0).get_tensor().set_names({"data1"});
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param2->set_friendly_name("param2");
|
||||
param2->output(0).get_tensor().set_names({"data2"});
|
||||
auto relu = std::make_shared<ov::op::v0::Relu>(param1);
|
||||
@@ -336,8 +335,8 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedIENetwork) {
|
||||
concat->output(0).get_tensor().set_names({"concat"});
|
||||
auto result2 = std::make_shared<ov::op::v0::Result>(concat);
|
||||
result2->set_friendly_name("result2");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result1, result2},
|
||||
ngraph::ParameterVector{param1, param2});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result1, result2},
|
||||
ov::ParameterVector{param1, param2});
|
||||
function->set_friendly_name("SingleReLU");
|
||||
}
|
||||
execNet = ie->LoadNetwork(InferenceEngine::CNNNetwork(function), target_device, any_copy(configuration));
|
||||
@@ -363,11 +362,11 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedIENetwork) {
|
||||
EXPECT_NO_THROW(importedExecNet.output("relu_op").get_node());
|
||||
EXPECT_NO_THROW(importedExecNet.output("concat_op").get_node());
|
||||
|
||||
const auto outputType = elementType == ngraph::element::i32 ||
|
||||
elementType == ngraph::element::u32 ||
|
||||
elementType == ngraph::element::i64 ||
|
||||
elementType == ngraph::element::u64 ? ngraph::element::i32 : ngraph::element::f32;
|
||||
const auto inputType = elementType == ngraph::element::f16 ? ngraph::element::Type_t::f32 : elementType;
|
||||
const auto outputType = elementType == ov::element::i32 ||
|
||||
elementType == ov::element::u32 ||
|
||||
elementType == ov::element::i64 ||
|
||||
elementType == ov::element::u64 ? ov::element::i32 : ov::element::f32;
|
||||
const auto inputType = elementType == ov::element::f16 ? ov::element::Type_t::f32 : elementType;
|
||||
|
||||
EXPECT_EQ(inputType, importedExecNet.input("param1").get_element_type());
|
||||
EXPECT_EQ(inputType, importedExecNet.input("param2").get_element_type());
|
||||
@@ -382,12 +381,12 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedIENetworkParameterResultOn
|
||||
|
||||
// Create a simple function
|
||||
{
|
||||
auto param = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param->set_friendly_name("param");
|
||||
param->output(0).get_tensor().set_names({"data"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(param);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result}, ngraph::ParameterVector{param});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result}, ov::ParameterVector{param});
|
||||
function->set_friendly_name("ParamResult");
|
||||
}
|
||||
compiled_model = core->compile_model(function, target_device, configuration);
|
||||
@@ -420,13 +419,13 @@ TEST_P(OVCompiledGraphImportExportTest, importExportedIENetworkConstantResultOnl
|
||||
|
||||
// Create a simple function
|
||||
{
|
||||
auto constant = std::make_shared<ov::op::v0::Constant>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto constant = std::make_shared<ov::op::v0::Constant>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
constant->set_friendly_name("constant");
|
||||
constant->output(0).get_tensor().set_names({"data"});
|
||||
auto result = std::make_shared<ov::op::v0::Result>(constant);
|
||||
result->set_friendly_name("result");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result},
|
||||
ngraph::ParameterVector{});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result},
|
||||
ov::ParameterVector{});
|
||||
function->set_friendly_name("ConstResult");
|
||||
}
|
||||
execNet = ie->LoadNetwork(InferenceEngine::CNNNetwork(function), target_device, any_copy(configuration));
|
||||
@@ -461,10 +460,10 @@ TEST_P(OVCompiledGraphImportExportTest, ovImportExportedFunction) {
|
||||
|
||||
// Create simple function
|
||||
{
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param1 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param1->set_friendly_name("param1");
|
||||
param1->output(0).get_tensor().set_names({"data1"});
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ngraph::Shape({1, 3, 24, 24}));
|
||||
auto param2 = std::make_shared<ov::op::v0::Parameter>(elementType, ov::Shape({1, 3, 24, 24}));
|
||||
param2->set_friendly_name("param2");
|
||||
param2->output(0).get_tensor().set_names({"data2"});
|
||||
auto relu = std::make_shared<ov::op::v0::Relu>(param1);
|
||||
@@ -477,8 +476,8 @@ TEST_P(OVCompiledGraphImportExportTest, ovImportExportedFunction) {
|
||||
concat->output(0).get_tensor().set_names({"concat"});
|
||||
auto result2 = std::make_shared<ov::op::v0::Result>(concat);
|
||||
result2->set_friendly_name("result2");
|
||||
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result1, result2},
|
||||
ngraph::ParameterVector{param1, param2});
|
||||
function = std::make_shared<ov::Model>(ov::ResultVector{result1, result2},
|
||||
ov::ParameterVector{param1, param2});
|
||||
function->set_friendly_name("SingleReLU");
|
||||
}
|
||||
execNet = core->compile_model(function, target_device, configuration);
|
||||
|
||||
@@ -110,7 +110,7 @@ class OVClassCompiledModelGetPropertyTest_Priority : public ::testing::WithParam
|
||||
public OVCompiledNetworkTestBase {
|
||||
protected:
|
||||
ov::AnyMap configuration;
|
||||
std::shared_ptr<ngraph::Function> simpleNetwork;
|
||||
std::shared_ptr<ov::Model> simpleNetwork;
|
||||
|
||||
public:
|
||||
static std::string getTestCaseName(testing::TestParamInfo<PriorityParams> obj);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class OVClassExecutableNetworkGetMetricTest_Priority : public ::testing::WithPar
|
||||
public OVCompiledNetworkTestBase {
|
||||
protected:
|
||||
ov::AnyMap configuration;
|
||||
std::shared_ptr<ngraph::Function> simpleNetwork;
|
||||
std::shared_ptr<ov::Model> simpleNetwork;
|
||||
|
||||
public:
|
||||
static std::string getTestCaseName(testing::TestParamInfo<PriorityParams> obj);
|
||||
|
||||
-6
@@ -12,15 +12,9 @@
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "functional_test_utils/ov_plugin_cache.hpp"
|
||||
#include "ie_extension.h"
|
||||
#include <condition_variable>
|
||||
#include "openvino/core/shape.hpp"
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/utils/ov_helpers.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
#include <string>
|
||||
#include <ie_core.hpp>
|
||||
#include <thread>
|
||||
#include <base/behavior_test_utils.hpp>
|
||||
#include "common_test_utils/common_utils.hpp"
|
||||
|
||||
@@ -8,16 +8,12 @@
|
||||
#include <vector>
|
||||
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
#include "ngraph/function.hpp"
|
||||
#include "ov_models/subgraph_builders.hpp"
|
||||
#include "functional_test_utils/plugin_cache.hpp"
|
||||
#include "common_test_utils/unicode_utils.hpp"
|
||||
#include "openvino/util/common_util.hpp"
|
||||
#include "base/ov_behavior_test_utils.hpp"
|
||||
|
||||
#include <ie_core.hpp>
|
||||
#include <ie_common.h>
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
||||
namespace behavior {
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
|
||||
protected:
|
||||
std::string deathTestStyle;
|
||||
std::shared_ptr<ngraph::Function> function;
|
||||
std::shared_ptr<ov::Model> function;
|
||||
};
|
||||
|
||||
class OVHoldersTestOnImportedNetwork : public OVPluginTestBase,
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
void TearDown() override;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ngraph::Function> function;
|
||||
std::shared_ptr<ov::Model> function;
|
||||
std::string deathTestStyle;
|
||||
};
|
||||
|
||||
|
||||
-21
@@ -2,32 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
#include <gtest/gtest.h>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "functional_test_utils/ov_plugin_cache.hpp"
|
||||
#include "ie_extension.h"
|
||||
#include <condition_variable>
|
||||
#include "openvino/core/shape.hpp"
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/utils/ov_helpers.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
#include <string>
|
||||
#include <ie_core.hpp>
|
||||
#include <thread>
|
||||
#include <base/behavior_test_utils.hpp>
|
||||
#include "common_test_utils/common_utils.hpp"
|
||||
#include "functional_test_utils/plugin_cache.hpp"
|
||||
#include "functional_test_utils/blob_utils.hpp"
|
||||
#include "ov_models/subgraph_builders.hpp"
|
||||
#include "shared_test_classes/subgraph/basic_lstm.hpp"
|
||||
#include "behavior/ov_infer_request/infer_request_dynamic.hpp"
|
||||
#include "base/ov_behavior_test_utils.hpp"
|
||||
#include <common_test_utils/ov_tensor_utils.hpp>
|
||||
|
||||
namespace ov {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <fstream>
|
||||
|
||||
#include <ov_models/subgraph_builders.hpp>
|
||||
#include <base/behavior_test_utils.hpp>
|
||||
#include "behavior/ov_plugin/life_time.hpp"
|
||||
|
||||
namespace ov {
|
||||
@@ -37,7 +36,7 @@ void OVHoldersTest::TearDown() {
|
||||
EXPECT_EXIT(_statement; exit(0), testing::ExitedWithCode(0), "")
|
||||
|
||||
static void release_order_test(std::vector<std::size_t> order, const std::string &deviceName,
|
||||
std::shared_ptr<ngraph::Function> function) {
|
||||
std::shared_ptr<ov::Model> function) {
|
||||
ov::AnyVector objects;
|
||||
{
|
||||
ov::Core core = createCoreWithTemplate();
|
||||
|
||||
Reference in new issue
Block a user