Add missing ov_executable_network tests for teamplte plugin (#16190)

This commit is contained in:
Sofya Balandina authored and GitHub committed 2023-03-10 10:28:37 +04:00
1 parent da9b014c83
commit 8e24483f5c
5 files changed
+164

No files matched your search

@@ -0,0 +1,41 @@
// Copyright (C) 2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_network_base.hpp"
#include "ie_plugin_config.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<ov::AnyMap> configs = {
{},
};
const std::vector<ov::AnyMap> swPluginConfigs = {
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE)}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(swPluginConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(swPluginConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(swPluginConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
} // namespace
@@ -0,0 +1,107 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/get_metric.hpp"
#include "behavior/ov_plugin/properties_tests.hpp"
#include "openvino/runtime/core.hpp"
using namespace ov::test::behavior;
using namespace InferenceEngine::PluginConfigParams;
namespace {
//
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassImportExportTestP, OVClassExecutableNetworkImportExportTestP,
::testing::Values("HETERO:TEMPLATE"));
//
// Executable Network GetMetric
//
std::vector<std::string> devices = {"TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE", "AUTO:TEMPLATE"};
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::ValuesIn(devices));
const std::vector<ov::AnyMap> multiModelPriorityConfigs = {
{ov::hint::model_priority(ov::hint::Priority::HIGH)},
{ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
{ov::hint::model_priority(ov::hint::Priority::LOW)},
{ov::hint::model_priority(ov::hint::Priority::DEFAULT)}};
INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_MODEL_PRIORITY,
::testing::Combine(::testing::Values("AUTO:TEMPLATE"),
::testing::ValuesIn(multiModelPriorityConfigs)));
const std::vector<ov::AnyMap> multiDevicePriorityConfigs = {
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE)}};
INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_DEVICE_PRIORITY,
::testing::Combine(::testing::Values("MULTI", "AUTO"),
::testing::ValuesIn(multiDevicePriorityConfigs)),
OVClassExecutableNetworkGetMetricTest_DEVICE_PRIORITY::getTestCaseName);
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetConfigTest, OVClassExecutableNetworkGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkSetConfigTest, OVClassExecutableNetworkSetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
////
//// Hetero Executable Network GetMetric
////
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_EXEC_DEVICES,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
//////////////////////////////////////////////////////////////////////////////////////////
} // namespace
@@ -119,4 +119,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests, OVCompiledModelPropertie
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_properties)),
OVCompiledModelPropertiesTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_BehaviorTests, OVCompiledModelEmptyPropertiesTests, ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
OVCompiledModelEmptyPropertiesTests::getTestCaseName);
} // namespace
@@ -117,4 +117,12 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests, OVPropertiesTes
::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_properties)),
OVPropertiesTests::getTestCaseName);
const std::vector<std::tuple<std::string, std::pair<ov::AnyMap, std::string>>> GetMetricTest_ExecutionDevice_TEMPLATE = {
{CommonTestUtils::DEVICE_TEMPLATE, std::make_pair(ov::AnyMap{}, CommonTestUtils::DEVICE_TEMPLATE)}};
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES,
::testing::ValuesIn(GetMetricTest_ExecutionDevice_TEMPLATE),
OVCompileModelGetExecutionDeviceTests::getTestCaseName);
} // namespace
@@ -21,11 +21,15 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*oPRC=0.*oLT=1.*)",
// Not Implemented
R"(.*Behavior.*ExecutableNetworkBaseTest.*(canSetConfigToExecNet|canSetConfigToExecNetAndCheckConfigAndCheck).*)",
R"(.*OVExecutableNetworkBaseTest.*(CanSetConfigToExecNet|canSetConfigToExecNetAndCheckConfigAndCheck).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution|CheckExecGraphInfoSerialization).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CanCreateTwoExeNetworksAndCheckFunction).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(checkGetExecGraphInfoIsNotNullptr).*)",
R"(.*LoadNetworkCreateDefaultExecGraphResult.*)",
R"(.*OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES.*CanGetExecutionDeviceInfo.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*GetMetricNoThrow.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS.*GetMetricNoThrow.*)",
// TODO: Round with f16 is not supported
R"(.*smoke_Hetero_BehaviorTests.*OVExecGraphImportExportTest.*readFromV10IR.*)",