[IE TESTS] Behavior2.0 -> Plugin (#7579)

* Need to remove

* Preprocessing + InferRequest

* infer_request_callback

* tmp commit

* InferRequest

* tst

* tetet

* Fix template

* SetBlobType

* InferRequest Conformance

* Add prc

* Remove prc

* Fix paths

* commit

* Fixes for review

* Dynamic Batch

* fix

* fiz

* Try

* fkf

* Fix azure

* Centos

* skip

* conformance fix

* fix template

* Small fix

* small fix in print

* Fixes

* Behavior 2.0 -> ExecutableNetwork

* Export

* Skip configs

* Incorrect config

* Extend ExecNet

* add_out

* GnA+CPU

* fix template

* fix centos

* Init

* init

* Fix merge

* Separate OV_CORE_INTEGRATION

* vers

* plugin

* Remove test_plugin

* plugin

* test

* configuration

* config

* core_integration

* Small refactor

* Clean up exec net

* Config

* Clean&Up behavior tests

* Remove extra

* query network

* Version

* Add new tests

* merge

* fix win

* Fix some ci problems

* Refactor

* gpu

* myriad

* template

* gna

* Fix all plugin

* ov2.0 exec_nry

* openvino2.0

* build

* fix ci

* fix ci

* fix myriad

* Try to fix ci

* Try

* try

* Update windows.yml

* Update windows.yml

* Revert "Update windows.yml"

This reverts commit 93e326229c.

* ddd

* Update windows.yml

* Revert "Update windows.yml"

This reverts commit 5eb4bf875a.

* Revert "Update windows.yml"

This reverts commit 351ede4e1e.

* fix inference chaining

* Fix issues

* try to remove mkldnn from commit

* GPU

* Fix ov namespace

* fix ci

* try to fix kmb

* Try to fix

* Merge

* fix ci

* gna

* fix myriad

* merge

* Myriad

* myriad

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
This commit is contained in:
Irina Efode 2021-10-15 11:47:50 +03:00 committed by GitHub
parent 34fce43ab0
commit 3f690314fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
154 changed files with 5428 additions and 5431 deletions

View File

@ -17,7 +17,7 @@ using namespace ov;
namespace reference_tests {
CommonReferenceTest::CommonReferenceTest(): targetDevice("TEMPLATE") {
core = ov::test::PluginCache::get().core(targetDevice);
core = test::utils::PluginCache::get().core(targetDevice);
}
void CommonReferenceTest::Exec() {

View File

@ -1,29 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "behavior/exec_graph_info.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
ExecGraphTests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,34 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "behavior/executable_network/exec_network_base.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -0,0 +1,72 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <utility>
#include <string>
#include <vector>
#include "behavior/executable_network/get_metric.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported, IEClassExecutableNetworkGetMetricTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
//
// Hetero Executable Network GetMetric
//
#ifdef ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
#endif // ENABLE_MKL_DNN
} // namespace

View File

@ -5,7 +5,7 @@
#include "behavior/infer_request/inference_chaining.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace ov::test;
using namespace ov::test::behavior;
namespace {
@ -18,7 +18,6 @@ const std::vector<std::map<std::string, std::string>> HeteroConfigs = {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferenceChaining,
::testing::Combine(
::testing::Values(ov::element::f32),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
OVInferenceChaining::getTestCaseName);

View File

@ -1,62 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_exec_network.hpp"
#include <common_test_utils/test_constants.hpp>
#include "ie_plugin_config.hpp"
using namespace ov::test;
namespace {
const std::vector<ov::element::Type> netPrecisions = {
ov::element::i8,
ov::element::i16,
ov::element::i32,
ov::element::i64,
ov::element::u8,
ov::element::u16,
ov::element::u32,
ov::element::u64,
ov::element::f16,
ov::element::f32,
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_TEMPLATE}}};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_TEMPLATE}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecNetwork::getTestCaseName);
} // namespace

View File

@ -0,0 +1,55 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_graph_info.hpp"
#include "ie_plugin_config.hpp"
#include <common_test_utils/test_constants.hpp>
using namespace ov::test::behavior;
namespace {
const std::vector<ov::element::Type_t> netPrecisions = {
ov::element::i8,
ov::element::i16,
ov::element::i32,
ov::element::i64,
ov::element::u8,
ov::element::u16,
ov::element::u32,
ov::element::u64,
ov::element::f16,
ov::element::f32,
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_TEMPLATE}}};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_TEMPLATE}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
OVExecGraphImportExportTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecGraphImportExportTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecGraphImportExportTest::getTestCaseName);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/config.hpp"
#include "behavior/plugin/configuration_tests.hpp"
#include <template/template_config.hpp>
using namespace BehaviorTestsDefinitions;
@ -26,31 +26,13 @@ const std::vector<std::map<std::string, std::string>> inconfigs = {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(inconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(inconfigs)),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
CorrectConfigAPITests::getTestCaseName);
} // namespace

View File

@ -6,7 +6,7 @@
#include <string>
#include <vector>
#include "behavior/core_integration.hpp"
#include "behavior/plugin/core_integration.hpp"
using namespace BehaviorTestsDefinitions;
@ -69,12 +69,12 @@ INSTANTIATE_TEST_SUITE_P(
// IE Class SetConfig
//
using IEClassSetConfigTestHETERO = IEClassNetworkTest;
using IEClassSetConfigTestHETERO = BehaviorTestsUtils::IEClassNetworkTest;
TEST_F(IEClassSetConfigTestHETERO, smoke_SetConfigNoThrow) {
{
Core ie = createCoreWithTemplate();
Parameter p;
InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate();
InferenceEngine::Parameter p;
ASSERT_NO_THROW(ie.SetConfig({{HETERO_CONFIG_KEY(DUMP_GRAPH_DOT), CONFIG_VALUE(YES)}}, "HETERO"));
ASSERT_NO_THROW(p = ie.GetConfig("HETERO", HETERO_CONFIG_KEY(DUMP_GRAPH_DOT)));
@ -84,8 +84,8 @@ TEST_F(IEClassSetConfigTestHETERO, smoke_SetConfigNoThrow) {
}
{
Core ie = createCoreWithTemplate();
Parameter p;
InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate();
InferenceEngine::Parameter p;
ASSERT_NO_THROW(ie.SetConfig({{HETERO_CONFIG_KEY(DUMP_GRAPH_DOT), CONFIG_VALUE(NO)}}, "HETERO"));
ASSERT_NO_THROW(p = ie.GetConfig("HETERO", HETERO_CONFIG_KEY(DUMP_GRAPH_DOT)));
@ -95,8 +95,8 @@ TEST_F(IEClassSetConfigTestHETERO, smoke_SetConfigNoThrow) {
}
{
Core ie = createCoreWithTemplate();
Parameter p;
InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate();
InferenceEngine::Parameter p;
ASSERT_NO_THROW(ie.GetMetric("HETERO", METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_NO_THROW(ie.SetConfig({{HETERO_CONFIG_KEY(DUMP_GRAPH_DOT), CONFIG_VALUE(YES)}}, "HETERO"));
@ -115,11 +115,11 @@ INSTANTIATE_TEST_SUITE_P(
smoke_IEClassGetConfigTest, IEClassGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
using IEClassGetConfigTestTEMPLATE = IEClassNetworkTest;
using IEClassGetConfigTestTEMPLATE = BehaviorTestsUtils::IEClassNetworkTest;
TEST_F(IEClassGetConfigTestTEMPLATE, smoke_GetConfigNoThrow) {
Core ie = createCoreWithTemplate();
Parameter p;
InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate();
InferenceEngine::Parameter p;
std::string deviceName = CommonTestUtils::DEVICE_TEMPLATE;
ASSERT_NO_THROW(p = ie.GetMetric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
@ -139,41 +139,6 @@ TEST_F(IEClassGetConfigTestTEMPLATE, smoke_GetConfigNoThrow) {
}
}
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported, IEClassExecutableNetworkGetMetricTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(
@ -185,28 +150,4 @@ INSTANTIATE_TEST_SUITE_P(
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
//
// Hetero Executable Network GetMetric
//
#ifdef ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
#endif // ENABLE_MKL_DNN
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/cpp_holders.hpp"
#include "behavior/plugin/life_time.hpp"
using namespace BehaviorTestsDefinitions;

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/version.hpp"
#include "behavior/plugin/version.hpp"
using namespace BehaviorTestsDefinitions;
@ -13,10 +13,7 @@ const std::vector<std::map<std::string, std::string>> configs = {
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
VersionTest::getTestCaseName);
} // namespace

View File

@ -1,41 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/test_plugin.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
BehaviorTestOutput::getTestCaseName);
} // namespace

View File

@ -1,21 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "hetero/query_network.hpp"
#include "ngraph_functions/builders.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
namespace {
using namespace HeteroTests;
auto ConvBias = ngraph::builder::subgraph::makeConvBias();
INSTANTIATE_TEST_SUITE_P(smoke_FullySupportedTopologies, QueryNetworkTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "HETERO:TEMPLATE", "MULTI:TEMPLATE"),
::testing::Values(ConvBias)),
QueryNetworkTest::getTestCaseName);
} // namespace

View File

@ -19,7 +19,16 @@ std::vector<std::string> disabledTestPatterns() {
// CVS-51758
R"(.*InferRequestPreprocessConversionTest.*oLT=(NHWC|NCHW).*)",
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*oPRC=0.*oLT=1.*)",
//Not Implemented
R"(.*Behavior.*ExecutableNetworkBaseTest.*(canSetConfigToExecNet|canSetConfigToExecNetAndCheckConfigAndCheck).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution|CheckExecGraphInfoSerialization).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CanCreateTwoExeNetworksAndCheckFunction).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(checkGetExecGraphInfoIsNotNullptr).*)",
R"(.*smoke_BehaviorTests.*OVExecNetwork.ieImportExportedFunction.*)",
// TODO: Round with f16 is not supported
R"(.*smoke_Hetero_BehaviorTests.*OVExecNetwork.*readFromV10IR.*)",
// TODO: execution graph is not supported
R"(.*ExecGraph.*)",

View File

@ -68,9 +68,9 @@ HeteroExecutableNetwork::HeteroExecutableNetwork(const InferenceEngine::CNNNetwo
auto clonedFunction = ngraph::clone_function(*function);
auto itDumpDotFile = _config.find(HETERO_CONFIG_KEY(DUMP_GRAPH_DOT));
bool dumpDotFile = itDumpDotFile != _config.end() ? (itDumpDotFile->second == YES) : false;
#ifndef NDEBUG
dumpDotFile = true;
#endif
//#ifndef NDEBUG
// dumpDotFile = true;
//#endif
QueryNetworkResult queryNetworkResult;
auto orderedOps = clonedFunction->get_ordered_ops();

View File

@ -1,44 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/exec_graph_info.hpp"
#include "ie_plugin_config.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{ InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
ExecGraphTests::getTestCaseName);
// MULTI device does not support ExecGraph
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Multi_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ExecGraphTests::getTestCaseName);
// AUTO device does not support ExecGraph
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
ExecGraphTests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,59 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <common_test_utils/test_constants.hpp>
#include <exec_graph_info.hpp>
#include "behavior/executable_network/exec_graph_info.hpp"
namespace {
using namespace ExecutionGraphTests;
INSTANTIATE_TEST_SUITE_P(smoke_serialization, ExecGraphSerializationTest,
::testing::Values(CommonTestUtils::DEVICE_CPU),
ExecGraphSerializationTest::getTestCaseName);
TEST_P(ExecGraphUniqueNodeNames, CheckUniqueNodeNames) {
InferenceEngine::CNNNetwork cnnNet(fnPtr);
auto ie = PluginCache::get().ie();
auto execNet = ie->LoadNetwork(cnnNet, targetDevice);
InferenceEngine::CNNNetwork execGraphInfo = execNet.GetExecGraphInfo();
int numReorders = 0;
int expectedReorders = 2;
std::unordered_set<std::string> names;
auto function = execGraphInfo.getFunction();
ASSERT_NE(function, nullptr);
for (const auto & op : function->get_ops()) {
const auto & rtInfo = op->get_rt_info();
auto it = rtInfo.find(ExecGraphInfoSerialization::LAYER_TYPE);
ASSERT_NE(rtInfo.end(), it);
auto opType = std::dynamic_pointer_cast<ngraph::VariantImpl<std::string>>(it->second);
ASSERT_NE(nullptr, opType);
if (opType->get() == "Reorder") {
numReorders++;
}
}
ASSERT_EQ(numReorders, expectedReorders) << "Expected reorders: " << expectedReorders << ", actual reorders: " << numReorders;
};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32
};
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, ExecGraphUniqueNodeNames,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::SizeVector({1, 2, 5, 5})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ExecGraphUniqueNodeNames::getTestCaseName);
} // namespace

View File

@ -0,0 +1,87 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/exec_network_base.hpp"
#include "ie_plugin_config.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{ InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
ExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
ExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::U16
};
const std::vector<std::map<std::string, std::string>> configSetPrc = {
{},
{{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> AutoConfigsSetPrc = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}},
};
const std::vector<std::map<std::string, std::string>> MultiConfigsSetPrc = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configSetPrc)),
ExecNetSetPrecision::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsSetPrc)),
ExecNetSetPrecision::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(AutoConfigsSetPrc)),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -0,0 +1,72 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/get_metric.hpp"
using namespace BehaviorTestsDefinitions;
using namespace InferenceEngine::PluginConfigParams;
namespace {
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP, IEClassImportExportTestP,
::testing::Values("HETERO:CPU"));
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values("CPU"));
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("CPU"));
} // namespace

View File

@ -5,7 +5,7 @@
#include "behavior/infer_request/inference_chaining.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace ov::test;
using namespace ov::test::behavior;
namespace {
@ -15,7 +15,6 @@ const std::vector<std::map<std::string, std::string>> configs = {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferenceChaining,
::testing::Combine(
::testing::Values(ov::element::f32),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
OVInferenceChaining::getTestCaseName);

View File

@ -1,62 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_exec_network.hpp"
#include "ie_plugin_config.hpp"
#include <common_test_utils/test_constants.hpp>
using namespace ov::test;
namespace {
const std::vector<ov::element::Type> netPrecisions = {
ov::element::i8,
ov::element::i16,
ov::element::i32,
ov::element::i64,
ov::element::u8,
ov::element::u16,
ov::element::u32,
ov::element::u64,
ov::element::f16,
ov::element::f32,
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_CPU}}};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecNetwork::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
OVExecNetwork,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecNetwork::getTestCaseName);
} // namespace

View File

@ -0,0 +1,82 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/get_metric.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, OVClassImportExportTestP,
::testing::Values("HETERO:CPU"));
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetConfigTest, OVClassExecutableNetworkGetConfigTest,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkSetConfigTest, OVClassExecutableNetworkSetConfigTest,
::testing::Values("CPU"));
////
//// Hetero Executable Network GetMetric
////
//
//INSTANTIATE_TEST_SUITE_P(
// smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
// ::testing::Values("CPU"));
//
//INSTANTIATE_TEST_SUITE_P(
// smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
// ::testing::Values("CPU"));
//
//INSTANTIATE_TEST_SUITE_P(
// smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
// ::testing::Values("CPU"));
//
//INSTANTIATE_TEST_SUITE_P(
// smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
// ::testing::Values("CPU"));
//////////////////////////////////////////////////////////////////////////////////////////
} // namespace

View File

@ -0,0 +1,55 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_graph_info.hpp"
#include "ie_plugin_config.hpp"
#include <common_test_utils/test_constants.hpp>
using namespace ov::test::behavior;
namespace {
const std::vector<ov::element::Type_t> netPrecisions = {
ov::element::i8,
ov::element::i16,
ov::element::i32,
ov::element::i64,
ov::element::u8,
ov::element::u16,
ov::element::u32,
ov::element::u64,
ov::element::f16,
ov::element::f32,
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_CPU}}};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
OVExecGraphImportExportTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecGraphImportExportTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecGraphImportExportTest::getTestCaseName);
} // namespace

View File

@ -0,0 +1,66 @@
// Copyright (C) 2018-2021 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<std::map<std::string, std::string>> configs = {
{},
};
const std::vector<std::map<std::string, std::string>> multiConfigs = {
{{ InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> heteroConfigs = {
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::U16
};
const std::vector<std::map<std::string, std::string>> configSetPrc = {
{},
{{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> AutoConfigsSetPrc = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}},
};
const std::vector<std::map<std::string, std::string>> MultiConfigsSetPrc = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
} // namespace

View File

@ -2,11 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_core_integration.hpp"
#include "behavior/ov_plugin/core_integration.hpp"
#include "openvino/runtime/core.hpp"
using namespace BehaviorTestsDefinitions;
using namespace ov::test::behavior;
using namespace InferenceEngine::PluginConfigParams;
namespace {
@ -78,62 +77,6 @@ INSTANTIATE_TEST_SUITE_P(
smoke_OVClassGetConfigTest, OVClassGetConfigTest,
::testing::Values("CPU"));
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkGetConfigTest, OVClassExecutableNetworkGetConfigTest,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassExecutableNetworkSetConfigTest, OVClassExecutableNetworkSetConfigTest,
::testing::Values("CPU"));
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("CPU"));
//////////////////////////////////////////////////////////////////////////////////////////
TEST(OVClassBasicTest, smoke_SetConfigAfterCreatedThrow) {

View File

@ -3,10 +3,33 @@
//
#include "ie_plugin_config.hpp"
#include "behavior/config.hpp"
#include "ie_system_conf.h"
#include "behavior/plugin/configuration_tests.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
#if (defined(__APPLE__) || defined(_WIN32))
auto defaultBindThreadParameter = InferenceEngine::Parameter{[] {
auto numaNodes = InferenceEngine::getAvailableNUMANodes();
if (numaNodes.size() > 1) {
return std::string{CONFIG_VALUE(NUMA)};
} else {
return std::string{CONFIG_VALUE(NO)};
}
}()};
#else
auto defaultBindThreadParameter = InferenceEngine::Parameter{std::string{CONFIG_VALUE(YES)}};
#endif
INSTANTIATE_TEST_SUITE_P(
smoke_Basic,
DefaultConfigurationTest,
::testing::Combine(
::testing::Values("CPU"),
::testing::Values(DefaultParameter{CONFIG_KEY(CPU_BIND_THREAD), defaultBindThreadParameter})),
DefaultConfigurationTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
@ -47,23 +70,20 @@ namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(Configs)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(Configs)),
CorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigs)),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigs)),
CorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(MultiConfigs)),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(MultiConfigs)),
CorrectConfigTests::getTestCaseName);
const std::vector<std::map<std::string, std::string>> inconfigs = {
@ -105,67 +125,57 @@ namespace {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(conf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiconf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiconf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(inconfigs)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(inconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(inconfigs)),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigAPITests::getTestCaseName);
const std::vector<std::map<std::string, std::string>> ConfigsCheck = {
{},
{{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::THROUGHPUT}},
{{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::LATENCY}},
{{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::LATENCY},
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT_NUM_REQUESTS, "1"}},
{{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, "8"}},
{{InferenceEngine::PluginConfigParams::KEY_CPU_BIND_THREAD, InferenceEngine::PluginConfigParams::NO}},
{{InferenceEngine::PluginConfigParams::KEY_CPU_BIND_THREAD, InferenceEngine::PluginConfigParams::YES}},
{{InferenceEngine::PluginConfigParams::KEY_DYN_BATCH_LIMIT, "10"}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigCheck,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(ConfigsCheck)),
CorrectConfigCheck::getTestCaseName);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/core_integration.hpp"
#include "behavior/plugin/core_integration.hpp"
using namespace BehaviorTestsDefinitions;
@ -21,10 +21,6 @@ INSTANTIATE_TEST_SUITE_P(
smoke_IEClassNetworkTestP, IEClassNetworkTestP,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP, IEClassImportExportTestP,
::testing::Values("HETERO:CPU"));
//
// IE Class GetMetric
//
@ -77,66 +73,10 @@ INSTANTIATE_TEST_SUITE_P(
smoke_IEClassGetConfigTest, IEClassGetConfigTest,
::testing::Values("CPU"));
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU", "AUTO:CPU"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values("CPU"));
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("CPU"));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("CPU"));
//////////////////////////////////////////////////////////////////////////////////////////
TEST(IEClassBasicTest, smoke_SetConfigAfterCreatedThrow) {
Core ie;
InferenceEngine::Core ie;
std::string value = {};
ASSERT_NO_THROW(ie.SetConfig({{KEY_CPU_THREADS_NUM, "1"}}, "CPU"));

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/core_threading_tests.hpp>
#include <behavior/plugin/core_threading.hpp>
namespace {

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/cpp_holders.hpp"
#include "behavior/plugin/life_time.hpp"
using namespace BehaviorTestsDefinitions;
namespace {

View File

@ -0,0 +1,26 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/plugin/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_CPU),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_MULTI),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_AUTO),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_HETERO),
VersionTest::getTestCaseName);
} // namespace

View File

@ -1,108 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/test_plugin.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::U16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> MultiConfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> configsInput = {
{},
{{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> MultiConfigsInputOutput = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> AutoConfigsInputOutput = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> configsOutput = {
{},
{{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configsOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(AutoConfigsInputOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(MultiConfigs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configsInput)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(AutoConfigsInputOutput)),
BehaviorTestInput::getTestCaseName);
} // namespace

View File

@ -1,50 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> Heteroconfigs = {
{{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_CPU}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(configs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(Multiconfigs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(Multiconfigs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(Heteroconfigs)),
VersionTest::getTestCaseName);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/infer_request/dynamic_batch.hpp>
#include <blob_tests/dynamic_batch.hpp>
#include "common_test_utils/test_constants.hpp"
namespace ConfigurationTestsDefinitions {

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/set_blob.hpp"
#include "blob_tests/set_blob.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace BehaviorTestsDefinitions;

View File

@ -1,34 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include "configuration_tests/configuration_tests.hpp"
#include "threading/ie_istreams_executor.hpp"
#include "ie_plugin_config.hpp"
#if (defined(__APPLE__) || defined(_WIN32))
#include "ie_system_conf.h"
#endif
namespace {
#if (defined(__APPLE__) || defined(_WIN32))
auto defaultBindThreadParameter = InferenceEngine::Parameter{[] {
auto numaNodes = InferenceEngine::getAvailableNUMANodes();
if (numaNodes.size() > 1) {
return std::string{CONFIG_VALUE(NUMA)};
} else {
return std::string{CONFIG_VALUE(NO)};
}
}()};
#else
auto defaultBindThreadParameter = InferenceEngine::Parameter{std::string{CONFIG_VALUE(YES)}};
#endif
INSTANTIATE_TEST_SUITE_P(
smoke_Basic,
DefaultConfigurationTest,
::testing::Combine(
::testing::Values("CPU"),
::testing::Values(DefaultParameter{CONFIG_KEY(CPU_BIND_THREAD), defaultBindThreadParameter})),
DefaultConfigurationTest::getTestCaseName);
} // namespace

View File

@ -3,7 +3,7 @@
//
#include <common_test_utils/test_constants.hpp>
#include "behavior/add_output.hpp"
#include "execution_graph_tests/add_output.hpp"
#include "functional_test_utils/plugin_cache.hpp"
#include "ngraph_functions/builders.hpp"

View File

@ -1,17 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <common_test_utils/test_constants.hpp>
#include "execution_graph_tests/exec_graph_serialization.hpp"
namespace {
using namespace ExecutionGraphTests;
INSTANTIATE_TEST_SUITE_P(smoke_serialization, ExecGraphSerializationTest,
::testing::Values(CommonTestUtils::DEVICE_CPU),
ExecGraphSerializationTest::getTestCaseName);
} // namespace

View File

@ -1,24 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "execution_graph_tests/unique_node_names.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace ExecutionGraphTests;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32
};
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, ExecGraphUniqueNodeNames,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::SizeVector({1, 2, 5, 5})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ExecGraphUniqueNodeNames::getTestCaseName);
} // namespace

View File

@ -1,21 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "hetero/query_network.hpp"
#include "ngraph_functions/builders.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
namespace {
using namespace HeteroTests;
auto ConvBias = ngraph::builder::subgraph::makeConvBias();
INSTANTIATE_TEST_SUITE_P(smoke_FullySupportedTopologies, QueryNetworkTest,
::testing::Combine(
::testing::Values("CPU", "HETERO:CPU", "MULTI:CPU"),
::testing::Values(ConvBias)),
QueryNetworkTest::getTestCaseName);
} // namespace

View File

@ -3,7 +3,7 @@
//
#include <vector>
#include "behavior/invalid_cases/proposal.hpp"
#include "single_layer_tests/invalid_cases/proposal.hpp"
using namespace ngraph::helpers;
using namespace LayerTestsDefinitions;

View File

@ -29,8 +29,6 @@ std::vector<std::string> disabledTestPatterns() {
// TODO: Issue: 43793
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*iPRC=0.*_iLT=1.*)",
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*oPRC=0.*_oLT=1.*)",
// TODO: Issue: 34348
R"(.*IEClassGetAvailableDevices.*)",
// TODO: Issue: 63469
R"(.*ConversionLayerTest.*ConvertLike.*)",
// TODO: Issue: 34055
@ -79,26 +77,42 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*Behavior.*InferRequestIOBBlobSetLayoutTest.*CanSetOutBlobWithDifferentLayouts.*layout=CN.*targetDevice=(AUTO|MULTI).*)",
R"(.*Behavior.*InferRequestSetBlobByType.*Batched.*)",
R"(.*Auto_Behavior.*InferRequestIOBBlobTest.*canProcessDeallocatedOutputBlobAfterGetAndSetBlob.*)",
R"(.*Auto.*Behavior.*ExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableWithIncorrectConfig.*)",
R"(.*(Auto|Multi).*Behavior.*CorrectConfigAPITests.*CanSetExclusiveAsyncRequests.*)",
R"(.*(Auto|Multi).*Behavior.*IncorrectConfigTests.*CanNotLoadNetworkWithIncorrectConfig.*)",
R"(.*OVExecutableNetworkBaseTest.*(CanGetInputsInfoAndCheck|CanSetConfigToExecNet|canLoadCorrectNetworkToGetExecutableWithIncorrectConfig).*)",
R"(.*Behavior.*CorrectConfigCheck.*(canSetConfigAndCheckGetConfig|canSetConfigTwiceAndCheckGetConfig).*CPU_BIND_THREAD=YES.*)",
// azure is failing after #6199
R"(.*/NmsLayerTest.*)",
// TODO: 56520 Accuracy mismatch
R"(.*ReduceOpsLayerTest.*type=Mean_.*netPRC=(I64|I32).*)",
R"(.*ReduceOpsLayerTest.*type=Mean_.*netPRC=U64.*)",
// Not implemented yet:
R"(.*Behavior.*ExecutableNetworkBaseTest.*canSetConfigToExecNet.*)",
R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*checkGetExecGraphInfo.*)",
R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*CanCreateTwoExeNetworksAndCheckFunction.*)",
R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution).*)",
R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*CheckExecGraphInfoSerialization.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canSetConfigToExecNetWithIncorrectConfig.*)",
R"(.*OVExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableWithIncorrectConfig.*)",
R"(.*Hetero.*Behavior.*ExecutableNetworkBaseTest.*ExecGraphInfo.*)",
R"(.*Hetero.*Behavior.*ExecutableNetworkBaseTest.*CanCreateTwoExeNetworksAndCheckFunction.*)",
// CPU plugin does not support some precisions
R"(.*smoke_(Auto|Multi)_BehaviorTests.*OVExecNetwork.*type=(i8|u32).*)",
R"(.*smoke_(Auto|Multi)_BehaviorTests.*OVExecNetwork.*type=(f16).*)",
R"(.*smoke_Hetero_BehaviorTests.*OVExecNetwork.*type=(i8|u32).*)",
R"(.*smoke_Hetero_BehaviorTests.*OVExecNetwork.*type=(f16).*)",
R"(.*smoke_BehaviorTests.*OVExecNetwork.*type=(i8|u32).*)",
R"(.*smoke_BehaviorTests.*OVExecNetwork.*type=(f16).*)",
R"(smoke_CachingSupportCase_CPU/LoadNetworkCacheTestBase.CompareWithRefImpl/ReadConcatSplitAssign_f32_batch1_CPU)",
// Issue 66685
R"(smoke_PrePostProcess.*resize_linear_nhwc.*)",
// CPU plugin does not support some precisions
R"(.*Behavior.*OVExecGraphImportExportTest.*elementType=(i8|u32).*)",
R"(.*Behavior.*OVExecGraphImportExportTest.*elementType=(f16).*)",
// TODO: CVS-66526 overrides i/o precisions in execution graph
// as WA we used GetInputsInfo() precisions instead of ngraph ones
// R"(.*smoke_BehaviorTests.*OVExecNetwork.*importExportedFunction.*type=(i16|u16).*)",
// R"(.*smoke_BehaviorTests.*OVExecNetwork.*importExportedFunction.*type=(i64|u64).*)",
// R"(.*smoke_BehaviorTests.*OVExecNetwork.*importExportedIENetwork.*type=(i16|u16).*)",
// R"(.*smoke_BehaviorTests.*OVExecNetwork.*importExportedIENetwork.*type=(i64|u64).*)",
// R"(.*smoke_BehaviorTests.*OVExecGraphImportExportTest.*importExportedFunction.*type=(i16|u16).*)",
// R"(.*smoke_BehaviorTests.*OVExecGraphImportExportTest.*importExportedFunction.*type=(i64|u64).*)",
// R"(.*smoke_BehaviorTests.*OVExecGraphImportExportTest.*importExportedIENetwork.*type=(i16|u16).*)",
// R"(.*smoke_BehaviorTests.*OVExecGraphImportExportTest.*importExportedIENetwork.*type=(i64|u64).*)",
// CPU does not support dynamic rank
// Issue: CVS-66778
@ -111,14 +125,8 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_BehaviorTests.*InferUpperBoundNetworkWithGetTensor.*)",
R"(.*smoke_BehaviorTests.*InferDynamicNetworkWithGetTensor.*)",
// Issue: 62746
R"(smoke_CachingSupportCase_CPU/LoadNetworkCacheTestBase.CompareWithRefImpl/ReadConcatSplitAssign_f32_batch1_CPU)",
// TODO: Issue CVS-51680
R"(.*BehaviorTests.*canRun3SyncRequestsConsistentlyFromThreads.*CPU_THROUGHPUT.*)",
// Issue 66685
R"(smoke_PrePostProcess.*resize_linear_nhwc.*)",
// Issue 67214
R"(smoke_PrePostProcess.*resize_and_convert_layout_i8.*)",
// Issue 67910

View File

@ -1,25 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/exec_graph_info.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
ExecGraphTests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,37 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/exec_network_base.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> setPRC = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -2,76 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/core_integration.hpp"
#include "behavior/executable_network/get_metric.hpp"
#include <gna/gna_config.hpp>
using namespace BehaviorTestsDefinitions;
namespace {
//
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassBasicTestP, IEClassBasicTestP,
::testing::Values(std::make_pair("GNAPlugin", "GNA")));
// TODO
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassNetworkTestP, IEClassNetworkTestP,
::testing::Values("GNA"));
//
// IE Class GetMetric
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME,
::testing::Values("GNA", "MULTI", "HETERO"));
// TODO: Issue: 30198
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
::testing::Values("GNA"));
// TODO: Issue: 30199
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetAvailableDevices, IEClassGetAvailableDevices,
::testing::Values("GNA"));
//
// IE Class GetConfig
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetConfigTest, IEClassGetConfigTest,
::testing::Values("GNA"));
//
// Executable Network GetMetric
//
@ -119,16 +55,16 @@ INSTANTIATE_TEST_SUITE_P(
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassExecutableNetworkSupportedConfigTest, IEClassExecutableNetworkSupportedConfigTest,
::testing::Combine(::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_AUTO))));
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_AUTO))));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassExecutableNetworkUnsupportedConfigTest, IEClassExecutableNetworkUnsupportedConfigTest,
::testing::Combine(::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_FP32),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_FP32),
std::make_pair(GNA_CONFIG_KEY(SCALE_FACTOR), "5"),
std::make_pair(CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)),
std::make_pair(GNA_CONFIG_KEY(COMPACT_MODE), CONFIG_VALUE(NO)))));
@ -136,36 +72,24 @@ INSTANTIATE_TEST_SUITE_P(
using IEClassExecutableNetworkSetConfigFromFp32Test = IEClassExecutableNetworkGetMetricTestForSpecificConfig;
TEST_P(IEClassExecutableNetworkSetConfigFromFp32Test, SetConfigFromFp32Throws) {
Core ie;
InferenceEngine::Core ie;
std::map<std::string, std::string> initialConfig;
initialConfig[GNA_CONFIG_KEY(DEVICE_MODE)] = GNAConfigParams::GNA_SW_FP32;
ExecutableNetwork exeNetwork = ie.LoadNetwork(simpleNetwork, deviceName, initialConfig);
initialConfig[GNA_CONFIG_KEY(DEVICE_MODE)] = InferenceEngine::GNAConfigParams::GNA_SW_FP32;
InferenceEngine::ExecutableNetwork exeNetwork = ie.LoadNetwork(simpleCnnNetwork, deviceName, initialConfig);
ASSERT_THROW(exeNetwork.SetConfig({{configKey, configValue}}), Exception);
ASSERT_THROW(exeNetwork.SetConfig({{configKey, configValue}}), InferenceEngine::Exception);
}
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassExecutableNetworkSetConfigFromFp32Test, IEClassExecutableNetworkSetConfigFromFp32Test,
::testing::Combine(::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_FP32),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_AUTO))));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassQueryNetworkTest, IEClassQueryNetworkTest,
::testing::Values("GNA"));
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest,
::testing::Values("GNA"));
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_FP32),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_AUTO))));
//
// Hetero Executable Network GetMetric

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_network_base.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
OVExecutableNetworkBaseTest::getTestCaseName);
} // namespace

View File

@ -0,0 +1,123 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/get_metric.hpp"
#include <gna/gna_config.hpp>
using namespace ov::test::behavior;
namespace {
//
// Executable Network GetMetric
//
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GNA" /*, "MULTI:GNA", "HETERO:GNA" */));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GNA" /*, "MULTI:GNA", "HETERO:GNA" */));
// TODO: this metric is not supported by the plugin
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GNA", "MULTI:GNA", "HETERO:GNA"));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("GNA" /*, "MULTI:GNA", "HETERO:GNA" */));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("GNA", /* "MULTI:GNA", */ "HETERO:GNA"));
//
// Executable Network GetConfig / SetConfig
//
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkGetConfigTest,
OVClassExecutableNetworkGetConfigTest,
::testing::Values("GNA"));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassExecutableNetworkSetConfigTest,
OVClassExecutableNetworkSetConfigTest,
::testing::Values("GNA"));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_OVClassExecutableNetworkSupportedConfigTest,
OVClassExecutableNetworkSupportedConfigTest,
::testing::Combine(
::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_AUTO))));
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_OVClassExecutableNetworkUnsupportedConfigTest,
OVClassExecutableNetworkUnsupportedConfigTest,
::testing::Combine(::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE),
InferenceEngine::GNAConfigParams::GNA_SW_FP32),
std::make_pair(GNA_CONFIG_KEY(SCALE_FACTOR), "5"),
std::make_pair(CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)),
std::make_pair(GNA_CONFIG_KEY(COMPACT_MODE), CONFIG_VALUE(NO)))));
using OVClassExecutableNetworkSetConfigFromFp32Test = OVClassExecutableNetworkGetMetricTestForSpecificConfig;
TEST_P(OVClassExecutableNetworkSetConfigFromFp32Test, SetConfigFromFp32Throws) {
ov::runtime::Core ie;
std::map<std::string, std::string> initialConfig;
initialConfig[GNA_CONFIG_KEY(DEVICE_MODE)] = InferenceEngine::GNAConfigParams::GNA_SW_FP32;
ov::runtime::ExecutableNetwork exeNetwork = ie.compile_model(simpleNetwork, deviceName, initialConfig);
ASSERT_THROW(exeNetwork.set_config({{configKey, configValue}}), ov::Exception);
}
// TODO: Convolution with 3D input is not supported on GNA
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_OVClassExecutableNetworkSetConfigFromFp32Test,
OVClassExecutableNetworkSetConfigFromFp32Test,
::testing::Combine(
::testing::Values("GNA"),
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_HW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_EXACT),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_SW_FP32),
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), InferenceEngine::GNAConfigParams::GNA_AUTO))));
//
// Hetero Executable Network GetMetric
//
// TODO: verify hetero interop
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GNA"));
// TODO: verify hetero interop
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GNA"));
// TODO: verify hetero interop
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(smoke_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("GNA"));
} // namespace

View File

@ -0,0 +1,78 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_plugin/core_integration.hpp"
#include <gna/gna_config.hpp>
using namespace ov::test::behavior;
namespace {
//
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassBasicTestP,
OVClassBasicTestP,
::testing::Values(std::make_pair("GNAPlugin", "GNA")));
// TODO
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassNetworkTestP, OVClassNetworkTestP, ::testing::Values("GNA"));
//
// IE Class GetMetric
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_AVAILABLE_DEVICES,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_FULL_DEVICE_NAME,
::testing::Values("GNA", "MULTI", "HETERO"));
// TODO: Issue: 30198
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassGetMetricTest,
OVClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
::testing::Values("GNA"));
// TODO: Issue: 30199
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_OVClassGetMetricTest,
OVClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetConfigTest,
OVClassGetConfigTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetAvailableDevices, OVClassGetAvailableDevices, ::testing::Values("GNA"));
//
// IE Class GetConfig
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetConfigTest, OVClassGetConfigTest, ::testing::Values("GNA"));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(smoke_OVClassQueryNetworkTest, OVClassQueryNetworkTest, ::testing::Values("GNA"));
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(smoke_OVClassLoadNetworkTest, OVClassLoadNetworkTest, ::testing::Values("GNA"));
} // namespace

View File

@ -3,7 +3,7 @@
//
#include "gna/gna_config.hpp"
#include "behavior/config.hpp"
#include "behavior/plugin/configuration_tests.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
@ -24,7 +24,6 @@ namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(inconfigs)),
IncorrectConfigTests::getTestCaseName);
@ -40,22 +39,7 @@ namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(Inconfigs)),
IncorrectConfigAPITests::getTestCaseName);
const std::vector<std::map<std::string, std::string>> conf = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(conf)),
CorrectConfigAPITests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,86 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/plugin/core_integration.hpp"
#include <gna/gna_config.hpp>
using namespace BehaviorTestsDefinitions;
namespace {
//
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassBasicTestP, IEClassBasicTestP,
::testing::Values(std::make_pair("GNAPlugin", "GNA")));
// TODO
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassNetworkTestP, IEClassNetworkTestP,
::testing::Values("GNA"));
//
// IE Class GetMetric
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME,
::testing::Values("GNA", "MULTI", "HETERO"));
// TODO: Issue: 30198
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
::testing::Values("GNA"));
// TODO: Issue: 30199
INSTANTIATE_TEST_SUITE_P(
DISABLED_smoke_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
::testing::Values("GNA"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported,
::testing::Values("GNA", "MULTI", "HETERO"));
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetAvailableDevices, IEClassGetAvailableDevices,
::testing::Values("GNA"));
//
// IE Class GetConfig
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassGetConfigTest, IEClassGetConfigTest,
::testing::Values("GNA"));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassQueryNetworkTest, IEClassQueryNetworkTest,
::testing::Values("GNA"));
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest,
::testing::Values("GNA"));
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/core_threading_tests.hpp>
#include <behavior/plugin/core_threading.hpp>
namespace {
Params params[] = {

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/cpp_holders.hpp"
#include "behavior/plugin/life_time.hpp"
using namespace BehaviorTestsDefinitions;
namespace {

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/plugin/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_GNA),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_HETERO),
VersionTest::getTestCaseName);
} // namespace

View File

@ -1,40 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/test_plugin.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
BehaviorTestOutput::getTestCaseName);
} // namespace

View File

@ -1,32 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> Heteroconfigs = {
{{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_GNA}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(configs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(Heteroconfigs)),
VersionTest::getTestCaseName);
} // namespace

View File

@ -3,7 +3,7 @@
//
#include <common_test_utils/test_constants.hpp>
#include "behavior/add_output.hpp"
#include "execution_graph_tests/add_output.hpp"
#include "functional_test_utils/test_model/test_model.hpp"
#include "functional_test_utils/plugin_cache.hpp"

View File

@ -51,6 +51,19 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_MemoryTest.*iteration_count=4.*IS=\(1.10\).*)",
R"(.*smoke_MemoryTest.*iteration_count=10.*IS=\(1.10\).*)",
R"(.*smoke_MemoryTest.*LOW_LATENCY.*iteration_count=10.*IS=\(1.2\).*)",
// Not implemented yet
R"(.*Behavior.*ExecutableNetworkBaseTest.*(canSetConfigToExecNet|canSetConfigToExecNetWithIncorrectConfig).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution|CheckExecGraphInfoSerialization).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(CanCreateTwoExeNetworksAndCheckFunction).*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*(checkGetExecGraphInfoIsNotNullptr).*)",
// Not expected behavior
R"(.*Behavior.*ExecNetSetPrecision.*canSetInputPrecisionForNetwork.*FP16.*)",
R"(.*OVExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableWithIncorrectConfig.*)",
R"(.*OVExecutableNetworkBaseTest.*CanSetConfigToExecNet.*)",
R"(.*OVExecutableNetworkBaseTest.*CanGetInputsInfoAndCheck.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK.*GetMetricNoThrow.*)",
R"(.*Behavior.*OVExecutableNetworkBaseTest.*get(Inputs|Outputs)FromFunctionWithSeveral(Inputs|Outputs).*)",
// TODO: Issue: 29577
R"(.*QueryNetwork.*)",
// TODO: GNA plugin does not support ExecGraph

View File

@ -1,25 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/exec_graph_info.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configs)),
ExecGraphTests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,28 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <common_test_utils/test_constants.hpp>
#include "behavior/executable_network/exec_graph_info.hpp"
namespace {
using namespace ExecutionGraphTests;
INSTANTIATE_TEST_SUITE_P(smoke_serialization, ExecGraphSerializationTest,
::testing::Values(CommonTestUtils::DEVICE_GPU),
ExecGraphSerializationTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32
};
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, ExecGraphUniqueNodeNames,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::SizeVector({1, 2, 5, 5})),
::testing::Values(CommonTestUtils::DEVICE_GPU)),
ExecGraphUniqueNodeNames::getTestCaseName);
} // namespace

View File

@ -0,0 +1,75 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/exec_network_base.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> setNetPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::FP16
};
// AUTO:CPU,GPU test case will use cpu plugin which doesn't support FP16
const std::vector<InferenceEngine::Precision> netPrecisionsForAutoCG = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32
};
const std::vector<std::map<std::string, std::string>> configsSetPrc = {
{},
{{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> multiConfig = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU},
{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> autoConfig = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU}},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configsSetPrc)),
ExecNetSetPrecision::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiConfig)),
ExecNetSetPrecision::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfig)),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -0,0 +1,85 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/get_metric.hpp"
#ifdef _WIN32
# include "gpu/gpu_context_api_dx.hpp"
#elif defined ENABLE_LIBVA
# include <gpu/gpu_context_api_va.hpp>
#endif
#include "gpu/gpu_context_api_ocl.hpp"
#include "gpu/gpu_config.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values("GPU")
);
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("GPU")
);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/locale.hpp"
#include "behavior/executable_network/locale.hpp"
using namespace BehaviorTestsDefinitions;
namespace {

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_network_base.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{},
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configs)),
OVExecutableNetworkBaseTest::getTestCaseName);
} // namespace

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/get_metric.hpp"
#include "openvino/runtime/core.hpp"
using namespace ov::test::behavior;
using namespace InferenceEngine::PluginConfigParams;
namespace {
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU"));
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkGetConfigTest,
OVClassExecutableNetworkGetConfigTest,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassExecutableNetworkSetConfigTest,
OVClassExecutableNetworkSetConfigTest,
::testing::Values("GPU"));
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassHeteroExecutableNetworlGetMetricTest,
OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("GPU"));
} // namespace

View File

@ -0,0 +1,145 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_plugin/core_integration.hpp"
#ifdef _WIN32
# include "gpu/gpu_context_api_dx.hpp"
#elif defined ENABLE_LIBVA
# include <gpu/gpu_context_api_va.hpp>
#endif
#include "gpu/gpu_config.hpp"
#include "gpu/gpu_context_api_ocl.hpp"
using namespace ov::test::behavior;
namespace {
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassCommon,
OVClassBasicTestP,
::testing::Values(std::make_pair("clDNNPlugin", "GPU")));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassNetworkTestP, OVClassNetworkTestP, ::testing::Values("GPU"));
//
// IE Class GetMetric
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU", "MULTI", "HETERO", "AUTO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU", "MULTI", "HETERO", "AUTO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_AVAILABLE_DEVICES,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_FULL_DEVICE_NAME,
::testing::Values("GPU", "MULTI", "HETERO", "AUTO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest, OVClassGetMetricTest_DEVICE_GOPS, ::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest, OVClassGetMetricTest_DEVICE_TYPE, ::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_RANGE_FOR_STREAMS,
::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_ThrowUnsupported,
::testing::Values("GPU", "MULTI", "HETERO", "AUTO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetConfigTest,
OVClassGetConfigTest_ThrowUnsupported,
::testing::Values("GPU", "MULTI", "HETERO", "AUTO"));
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetAvailableDevices, OVClassGetAvailableDevices, ::testing::Values("GPU"));
//
// GPU specific metrics
//
using OVClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE = OVClassBaseTestP;
TEST_P(OVClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE, GetMetricAndPrintNoThrow) {
ov::runtime::Core ie;
ov::runtime::Parameter p;
ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE)));
uint64_t t = p;
std::cout << "GPU device total memory size: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE));
}
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE,
::testing::Values("GPU"));
using OVClassGetMetricTest_GPU_UARCH_VERSION = OVClassBaseTestP;
TEST_P(OVClassGetMetricTest_GPU_UARCH_VERSION, GetMetricAndPrintNoThrow) {
ov::runtime::Core ie;
ov::runtime::Parameter p;
ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(UARCH_VERSION)));
std::string t = p;
std::cout << "GPU device uarch: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(UARCH_VERSION));
}
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_GPU_UARCH_VERSION,
::testing::Values("GPU"));
using OVClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT = OVClassBaseTestP;
TEST_P(OVClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT, GetMetricAndPrintNoThrow) {
ov::runtime::Core ie;
ov::runtime::Parameter p;
ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(EXECUTION_UNITS_COUNT)));
int t = p;
std::cout << "GPU EUs count: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(EXECUTION_UNITS_COUNT));
}
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest,
OVClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT,
::testing::Values("GPU"));
//
// IE Class GetConfig
//
INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetConfigTest, OVClassGetConfigTest, ::testing::Values("GPU"));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(smoke_OVClassQueryNetworkTest, OVClassQueryNetworkTest, ::testing::Values("GPU"));
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(smoke_OVClassLoadNetworkTest, OVClassLoadNetworkTest, ::testing::Values("GPU"));
INSTANTIATE_TEST_SUITE_P(smoke_OVClassHeteroExecutableNetworkGetMetricTest,
OVClassLoadNetworkAfterCoreRecreateTest,
::testing::Values("GPU"));
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/config.hpp"
#include "behavior/plugin/configuration_tests.hpp"
#include "cldnn/cldnn_config.hpp"
#include "gpu/gpu_config.hpp"
@ -90,21 +90,18 @@ namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(inconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoinconfigs)),
IncorrectConfigTests::getTestCaseName);
@ -180,59 +177,26 @@ namespace {
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT_NUM_REQUESTS, "1"}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(conf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, DefaultValuesConfigTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(conf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GPU_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(conf_gpu)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiconf)),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
CorrectConfigAPITests::getTestCaseName);
DefaultValuesConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(inconfigs)),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multiinconfigs)),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoinconfigs)),
IncorrectConfigAPITests::getTestCaseName);

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/core_integration.hpp"
#include "behavior/plugin/core_integration.hpp"
#ifdef _WIN32
# include "gpu/gpu_context_api_dx.hpp"
@ -96,18 +96,18 @@ INSTANTIATE_TEST_SUITE_P(
//
// GPU specific metrics
//
using IEClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE = IEClassBaseTestP;
using IEClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE = BehaviorTestsUtils::IEClassBaseTestP;
TEST_P(IEClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE, GetMetricAndPrintNoThrow) {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
Core ie;
Parameter p;
InferenceEngine::Core ie;
InferenceEngine::Parameter p;
ASSERT_NO_THROW(p = ie.GetMetric(deviceName, GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE)));
uint64_t t = p;
std::cout << "GPU device total memory size: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE));
ASSERT_METRIC_SUPPORTED_IE(GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE));
}
INSTANTIATE_TEST_SUITE_P(
@ -115,18 +115,18 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values("GPU")
);
using IEClassGetMetricTest_GPU_UARCH_VERSION = IEClassBaseTestP;
using IEClassGetMetricTest_GPU_UARCH_VERSION = BehaviorTestsUtils::IEClassBaseTestP;
TEST_P(IEClassGetMetricTest_GPU_UARCH_VERSION, GetMetricAndPrintNoThrow) {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
Core ie;
Parameter p;
InferenceEngine::Core ie;
InferenceEngine::Parameter p;
ASSERT_NO_THROW(p = ie.GetMetric(deviceName, GPU_METRIC_KEY(UARCH_VERSION)));
std::string t = p;
std::cout << "GPU device uarch: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(UARCH_VERSION));
ASSERT_METRIC_SUPPORTED_IE(GPU_METRIC_KEY(UARCH_VERSION));
}
INSTANTIATE_TEST_SUITE_P(
@ -134,18 +134,18 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values("GPU")
);
using IEClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT = IEClassBaseTestP;
using IEClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT = BehaviorTestsUtils::IEClassBaseTestP;
TEST_P(IEClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT, GetMetricAndPrintNoThrow) {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
Core ie;
Parameter p;
InferenceEngine::Core ie;
InferenceEngine::Parameter p;
ASSERT_NO_THROW(p = ie.GetMetric(deviceName, GPU_METRIC_KEY(EXECUTION_UNITS_COUNT)));
int t = p;
std::cout << "GPU EUs count: " << t << std::endl;
ASSERT_METRIC_SUPPORTED(GPU_METRIC_KEY(EXECUTION_UNITS_COUNT));
ASSERT_METRIC_SUPPORTED_IE(GPU_METRIC_KEY(EXECUTION_UNITS_COUNT));
}
INSTANTIATE_TEST_SUITE_P(
@ -162,17 +162,12 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values("GPU")
);
//
// Executable Network GetMetric
//
using IEClassExecutableNetworkGetMetricTest_GPU_MEMORY_STATISTICS = IEClassBaseTestP;
using IEClassExecutableNetworkGetMetricTest_GPU_MEMORY_STATISTICS = BehaviorTestsUtils::IEClassBaseTestP;
TEST_P(IEClassExecutableNetworkGetMetricTest_GPU_MEMORY_STATISTICS, GetMetricNoThrow) {
SKIP_IF_CURRENT_TEST_IS_DISABLED();
Core ie;
Parameter p;
InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate();
InferenceEngine::Parameter p;
ExecutableNetwork exeNetwork = ie.LoadNetwork(simpleNetwork, deviceName);
InferenceEngine::ExecutableNetwork exeNetwork = ie.LoadNetwork(simpleCnnNetwork, deviceName);
ASSERT_NO_THROW(p = exeNetwork.GetMetric(GPU_METRIC_KEY(MEMORY_STATISTICS)));
std::map<std::string, uint64_t> t = p;
@ -188,69 +183,6 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU", "AUTO:GPU,CPU")
);
//
// Executable Network GetConfig / SetConfig
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
::testing::Values("GPU")
);
//
// Hetero Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values("GPU")
);
INSTANTIATE_TEST_SUITE_P(
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values("GPU")
);
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/core_threading_tests.hpp>
#include <behavior/plugin/core_threading.hpp>
#include <remote_blob_tests/remote_blob_helpers.hpp>
using namespace InferenceEngine;

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/cpp_holders.hpp"
#include "behavior/plugin/life_time.hpp"
using namespace BehaviorTestsDefinitions;
namespace {

View File

@ -0,0 +1,24 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/plugin/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_GPU),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_MULTI),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_AUTO),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_HETERO),
VersionTest::getTestCaseName);
} // namespace

View File

@ -1,119 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/test_plugin.hpp"
#include "gpu/gpu_config.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::FP16
};
// AUTO:CPU,GPU test case will use cpu plugin which doesn't support FP16
const std::vector<InferenceEngine::Precision> netPrecisionsForAutoCG = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> MultiConfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_GPU}}
};
const std::vector<std::map<std::string, std::string>> autoConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU},
{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES ,
CommonTestUtils::DEVICE_GPU + std::string(",") + CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> configsInput = {
{},
{{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> MultiConfigsInputOutput = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU},
{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}}
};
const std::vector<std::map<std::string, std::string>> configsOutput = {
{},
{{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configsOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configsInput)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
BehaviorTestInput::getTestCaseName);
} // namespace

View File

@ -1,56 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_GPU}}
};
const std::vector<std::map<std::string, std::string>> autoConfigs = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU},
{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES ,
CommonTestUtils::DEVICE_GPU + std::string(",") + CommonTestUtils::DEVICE_CPU}}
};
const std::vector<std::map<std::string, std::string>> Heteroconfigs = {
{{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_GPU}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(configs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(Multiconfigs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(Heteroconfigs)),
VersionTest::getTestCaseName);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/infer_request/dynamic_batch.hpp>
#include <blob_tests/dynamic_batch.hpp>
#include "common_test_utils/test_constants.hpp"
namespace ConfigurationTestsDefinitions {

View File

@ -1,24 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "execution_graph_tests/unique_node_names.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace ExecutionGraphTests;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32
};
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, ExecGraphUniqueNodeNames,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::SizeVector({1, 2, 5, 5})),
::testing::Values(CommonTestUtils::DEVICE_GPU)),
ExecGraphUniqueNodeNames::getTestCaseName);
} // namespace

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "hetero/query_network.hpp"
#include "ngraph_functions/builders.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
namespace {
using namespace HeteroTests;
auto ConvBias = ngraph::builder::subgraph::makeConvBias();
auto SplitConvConcat = ngraph::builder::subgraph::makeNestedSplitConvConcat();
auto BranchSplitConvConcat = ngraph::builder::subgraph::makeSplitConvConcatNestedInBranch();
INSTANTIATE_TEST_SUITE_P(smoke_FullySupportedTopologies, QueryNetworkTest,
::testing::Combine(
::testing::Values("GPU", "HETERO:GPU,CPU", "MULTI:GPU,CPU"),
::testing::Values(ConvBias, SplitConvConcat, BranchSplitConvConcat)),
QueryNetworkTest::getTestCaseName);
} // namespace

View File

@ -68,8 +68,15 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*Behavior.*InferRequestIOBBlobSetLayoutTest.*CanSetOutBlobWithDifferentLayouts.*layout=(CN|HW).*)",
R"(.*Behavior.*(Multi|Auto).*InferRequestSetBlobByType.*Batched.*)",
R"(.*(Multi|Auto).*Behavior.*InferRequestIOBBlobTest.*canProcessDeallocatedOutputBlobAfterGetAndSetBlob.*)",
R"(.*(Auto|Multi).*Behavior.*IncorrectConfigTests.*CanNotLoadNetworkWithIncorrectConfig.*)",
// TODO: until issue is xxx-59670 is resolved
R"(.*Gather8LayerTest.*)",
// Not implemented yet:
R"(.*Behavior.*ExecutableNetworkBaseTest.*canSetConfigToExecNet.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
R"(.*OVExecutableNetworkBaseTest.*CanSetConfigToExecNet.*)",
R"(.*OVExecutableNetworkBaseTest.*CanSetConfigToExecNetAndCheckConfigAndCheck.*)",
R"(.*OVExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableWithIncorrectConfig.*)",
// TODO: Issue 66516
R"(.*smoke_PrePostProcess_GPU.*convert_element_type_and_mean.*)",
// TODO: Issue 67408

View File

@ -1,24 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/exec_graph_info.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecGraphTests,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
ExecGraphTests::getTestCaseName);
} // namespace

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <functional_test_utils/skip_tests_config.hpp>
#include "behavior/executable_network/get_metric.hpp"
#include "common_test_utils/file_utils.hpp"
using namespace BehaviorTestsDefinitions;
using IEClassExecutableNetworkGetMetricTest_nightly = IEClassExecutableNetworkGetMetricTest;
using IEClassExecutableNetworkGetConfigTest_nightly = IEClassExecutableNetworkGetConfigTest;
namespace {
std::vector<std::string> devices = {
std::string(CommonTestUtils::DEVICE_MYRIAD),
};
std::pair<std::string, std::string> plugins[] = {
std::make_pair(std::string("myriadPlugin"), std::string(CommonTestUtils::DEVICE_MYRIAD)),
};
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP, IEClassImportExportTestP,
::testing::Values(std::string(CommonTestUtils::DEVICE_MYRIAD), "HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD)));
#if defined(ENABLE_MKL_DNN) && ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP_HETERO_CPU, IEClassImportExportTestP,
::testing::Values("HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD) + ",CPU"));
#endif
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::ValuesIn(devices));
//
// Executable Network GetConfig
//
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetConfigTest_nightly,
IEClassExecutableNetworkGetConfigTest,
::testing::ValuesIn(devices));
} // namespace

View File

@ -0,0 +1,42 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/executable_network/exec_network_base.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> MultiConfigsInputOutput = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_MYRIAD}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
ExecNetSetPrecision::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, ExecNetSetPrecision,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
ExecNetSetPrecision::getTestCaseName);
} // namespace

View File

@ -0,0 +1,65 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/get_metric.hpp"
#include <functional_test_utils/skip_tests_config.hpp>
#include "common_test_utils/file_utils.hpp"
using namespace ov::test::behavior;
namespace {
std::vector<std::string> devices = {
std::string(CommonTestUtils::DEVICE_MYRIAD),
};
std::pair<std::string, std::string> plugins[] = {
std::make_pair(std::string("myriadPlugin"), std::string(CommonTestUtils::DEVICE_MYRIAD)),
};
INSTANTIATE_TEST_SUITE_P(smoke_OVClassImportExportTestP,
OVClassImportExportTestP,
::testing::Values(std::string(CommonTestUtils::DEVICE_MYRIAD),
"HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD)));
#if defined(ENABLE_MKL_DNN) && ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(smoke_OVClassImportExportTestP_HETERO_CPU,
OVClassImportExportTestP,
::testing::Values("HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD) + ",CPU"));
#endif
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetMetricTest_nightly,
OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetMetricTest_nightly,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetMetricTest_nightly,
OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetMetricTest_nightly,
OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetMetricTest_nightly,
OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::ValuesIn(devices));
//
// Executable Network GetConfig
//
INSTANTIATE_TEST_SUITE_P(OVClassExecutableNetworkGetConfigTest_nightly,
OVClassExecutableNetworkGetConfigTest,
::testing::ValuesIn(devices));
} // namespace

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_executable_network/exec_network_base.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecutableNetworkBaseTest,
::testing::Combine(
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
OVExecutableNetworkBaseTest::getTestCaseName);
} // namespace//

View File

@ -0,0 +1,108 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/ov_plugin/core_integration.hpp"
#include <functional_test_utils/skip_tests_config.hpp>
#include "common_test_utils/file_utils.hpp"
using namespace ov::test::behavior;
namespace {
std::vector<std::string> devices = {
std::string(CommonTestUtils::DEVICE_MYRIAD),
};
std::pair<std::string, std::string> plugins[] = {
std::make_pair(std::string("myriadPlugin"), std::string(CommonTestUtils::DEVICE_MYRIAD)),
};
//
// IE Class Common tests with <pluginName, deviceName params>
//
INSTANTIATE_TEST_SUITE_P(OVClassBasicTestP_smoke, OVClassBasicTestP, ::testing::ValuesIn(plugins));
INSTANTIATE_TEST_SUITE_P(OVClassNetworkTestP_smoke, OVClassNetworkTestP, ::testing::ValuesIn(devices));
//
// OVClassNetworkTestP tests, customized to add SKIP_IF_CURRENT_TEST_IS_DISABLED()
//
using OVClassNetworkTestP_VPU_GetMetric = OVClassNetworkTestP;
TEST_P(OVClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsFP16) {
ov::runtime::Core ie;
ASSERT_METRIC_SUPPORTED(METRIC_KEY(OPTIMIZATION_CAPABILITIES))
ov::runtime::Parameter optimizationCapabilitiesParameter;
ASSERT_NO_THROW(optimizationCapabilitiesParameter =
ie.get_metric(deviceName, METRIC_KEY(OPTIMIZATION_CAPABILITIES)));
const auto optimizationCapabilities = optimizationCapabilitiesParameter.as<std::vector<std::string>>();
ASSERT_EQ(optimizationCapabilities.size(), 1);
ASSERT_EQ(optimizationCapabilities.front(), METRIC_VALUE(FP16));
}
INSTANTIATE_TEST_SUITE_P(smoke_OVClassGetMetricP, OVClassNetworkTestP_VPU_GetMetric, ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(smoke_OVClassImportExportTestP,
OVClassImportExportTestP,
::testing::Values(std::string(CommonTestUtils::DEVICE_MYRIAD),
"HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD)));
#if defined(ENABLE_MKL_DNN) && ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(smoke_OVClassImportExportTestP_HETERO_CPU,
OVClassImportExportTestP,
::testing::Values("HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD) + ",CPU"));
#endif
//
// IE Class GetMetric
//
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_ThrowUnsupported,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_AVAILABLE_DEVICES,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetMetricTest_nightly,
OVClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
::testing::ValuesIn(devices));
//
// IE Class GetConfig
//
INSTANTIATE_TEST_SUITE_P(OVClassGetConfigTest_nightly, OVClassGetConfigTest, ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(OVClassGetConfigTest_nightly,
OVClassGetConfigTest_ThrowUnsupported,
::testing::ValuesIn(devices));
// IE Class Query network
INSTANTIATE_TEST_SUITE_P(DISABLED_OVClassQueryNetworkTest_smoke, OVClassQueryNetworkTest, ::testing::ValuesIn(devices));
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(OVClassLoadNetworkTest_smoke, OVClassLoadNetworkTest, ::testing::ValuesIn(devices));
} // namespace

View File

@ -5,7 +5,7 @@
#include "vpu/vpu_plugin_config.hpp"
#include "vpu/private_plugin_config.hpp"
#include "vpu/utils/optional.hpp"
#include "behavior/config.hpp"
#include "behavior/plugin/configuration_tests.hpp"
#include "myriad_devices.hpp"
IE_SUPPRESS_DEPRECATED_START
@ -236,7 +236,6 @@ std::vector<std::map<std::string, std::string>> getCorrectConfigs() {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getCorrectConfigs())),
CorrectConfigTests::getTestCaseName);
@ -252,14 +251,12 @@ const std::vector<std::map<std::string, std::string>>& getCorrectMultiConfigs()
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(getCorrectMultiConfigs())),
CorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, CorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(getCorrectMultiConfigs())),
CorrectConfigTests::getTestCaseName);
@ -318,7 +315,6 @@ const std::vector<std::pair<std::string, InferenceEngine::Parameter>>& getDefaul
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectSingleOptionDefaultValueConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getDefaultEntries())));
@ -570,7 +566,6 @@ const std::vector<std::tuple<std::string, std::string, InferenceEngine::Paramete
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectSingleOptionCustomValueConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getCustomEntries())));
@ -601,7 +596,6 @@ const std::vector<std::string>& getPublicOptions() {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigPublicOptionsTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getPublicOptions())));
@ -648,7 +642,6 @@ const std::vector<std::string>& getPrivateOptions() {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigPrivateOptionsTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getPrivateOptions())));
@ -835,7 +828,6 @@ const std::vector<std::map<std::string, std::string>>& getIncorrectConfigs() {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(getIncorrectConfigs())),
IncorrectConfigTests::getTestCaseName);
@ -902,55 +894,35 @@ const std::vector<std::map<std::string, std::string>>& getIncorrectMultiConfigs(
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(getIncorrectMultiConfigs())),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(getIncorrectMultiConfigs())),
IncorrectConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigSingleOptionTests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::Values("INCORRECT_KEY")));
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::Values(std::map<std::string, std::string>{})),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, CorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(getCorrectMultiConfigs())),
CorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::Values(std::map<std::string, std::string>{{"INCORRECT_KEY", "INCORRECT_VALUE"}})),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(getIncorrectMultiConfigs())),
IncorrectConfigAPITests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, IncorrectConfigAPITests,
::testing::Combine(
::testing::ValuesIn(getPrecisions()),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(getIncorrectMultiConfigs())),
IncorrectConfigAPITests::getTestCaseName);

View File

@ -3,13 +3,10 @@
//
#include <functional_test_utils/skip_tests_config.hpp>
#include "behavior/core_integration.hpp"
#include "behavior/plugin/core_integration.hpp"
#include "common_test_utils/file_utils.hpp"
using namespace BehaviorTestsDefinitions;
using IEClassExecutableNetworkGetMetricTest_nightly = IEClassExecutableNetworkGetMetricTest;
using IEClassExecutableNetworkGetConfigTest_nightly = IEClassExecutableNetworkGetConfigTest;
using IEClassGetMetricTest_nightly = IEClassGetMetricTest;
using IEClassGetConfigTest_nightly = IEClassGetConfigTest;
@ -41,10 +38,10 @@ INSTANTIATE_TEST_SUITE_P(
using IEClassNetworkTestP_VPU_GetMetric = IEClassNetworkTestP;
TEST_P(IEClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsFP16) {
Core ie;
ASSERT_METRIC_SUPPORTED(METRIC_KEY(OPTIMIZATION_CAPABILITIES))
InferenceEngine::Core ie;
ASSERT_METRIC_SUPPORTED_IE(METRIC_KEY(OPTIMIZATION_CAPABILITIES))
Parameter optimizationCapabilitiesParameter;
InferenceEngine::Parameter optimizationCapabilitiesParameter;
ASSERT_NO_THROW(optimizationCapabilitiesParameter = ie.GetMetric(deviceName, METRIC_KEY(OPTIMIZATION_CAPABILITIES)));
const auto optimizationCapabilities = optimizationCapabilitiesParameter.as<std::vector<std::string>>();
@ -56,55 +53,6 @@ INSTANTIATE_TEST_SUITE_P(
smoke_IEClassGetMetricP, IEClassNetworkTestP_VPU_GetMetric,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP, IEClassImportExportTestP,
::testing::Values(std::string(CommonTestUtils::DEVICE_MYRIAD), "HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD)));
#if defined(ENABLE_MKL_DNN) && ENABLE_MKL_DNN
INSTANTIATE_TEST_SUITE_P(
smoke_IEClassImportExportTestP_HETERO_CPU, IEClassImportExportTestP,
::testing::Values("HETERO:" + std::string(CommonTestUtils::DEVICE_MYRIAD) + ",CPU"));
#endif
//
// Executable Network GetMetric
//
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetMetricTest_nightly,
IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::ValuesIn(devices));
//
// Executable Network GetConfig
//
INSTANTIATE_TEST_SUITE_P(
IEClassExecutableNetworkGetConfigTest_nightly,
IEClassExecutableNetworkGetConfigTest,
::testing::ValuesIn(devices));
//
// IE Class GetMetric
//

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <behavior/core_threading_tests.hpp>
#include <behavior/plugin/core_threading.hpp>
namespace {

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/cpp_holders.hpp"
#include "behavior/plugin/life_time.hpp"
using namespace BehaviorTestsDefinitions;
namespace {

View File

@ -0,0 +1,22 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/plugin/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_MULTI),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Values(CommonTestUtils::DEVICE_HETERO),
VersionTest::getTestCaseName);
} // namespace

View File

@ -1,24 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "hetero/query_network.hpp"
#include "ngraph_functions/builders.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
namespace {
using namespace HeteroTests;
auto ConvBias = ngraph::builder::subgraph::makeConvBias();
auto TIwithLSTMcell = ngraph::builder::subgraph::makeTIwithLSTMcell();
auto SplitConvConcat = ngraph::builder::subgraph::makeNestedSplitConvConcat();
auto BranchSplitConvConcat = ngraph::builder::subgraph::makeSplitConvConcatNestedInBranch();
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, QueryNetworkTest,
::testing::Combine(
::testing::Values("MYRIAD", "HETERO:MYRIAD,CPU", "MULTI:MYRIAD,CPU"),
::testing::Values(ConvBias, TIwithLSTMcell, SplitConvConcat, BranchSplitConvConcat)),
QueryNetworkTest::getTestCaseName);
} // namespace

View File

@ -1,74 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/test_plugin.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::FP16
};
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> MultiConfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
};
const std::vector<std::map<std::string, std::string>> MultiConfigsInputOutput = {
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_MYRIAD}}
};
const std::vector<InferenceEngine::Precision> netPrecision = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecision),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput,
::testing::Combine(
::testing::ValuesIn(netPrecision),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestOutput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTests,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigs)),
BehaviorTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
BehaviorTestInput::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, BehaviorTestInput,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(MultiConfigsInputOutput)),
BehaviorTestInput::getTestCaseName);
} // namespace

View File

@ -1,43 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/version.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<std::map<std::string, std::string>> configs = {
{}
};
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
};
const std::vector<std::map<std::string, std::string>> Heteroconfigs = {
{{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_MYRIAD}}
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
::testing::ValuesIn(configs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(Multiconfigs)),
VersionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, VersionTest,
::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(Heteroconfigs)),
VersionTest::getTestCaseName);
} // namespace

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/detect_network_batch_test.hpp"
#include "blob_tests/detect_network_batch_test.hpp"
using namespace LayerTestsDefinitions;

View File

@ -48,7 +48,16 @@ std::vector<std::string> disabledTestPatterns() {
// TODO: Issue 58621
R"(.*IEClassNetworkTestP\.LoadNetworkActualNoThrow.*)",
R"(.*IEClassNetworkTestP\.LoadNetworkActualHeteroDeviceNoThrow.*)",
// Not implemented yet:
R"(.*Behavior.*ExecutableNetworkBaseTest.*canSetConfigToExecNet.*)",
R"(.*Behavior.*ExecutableNetworkBaseTest.*canExport.*)",
// TODO: CVS-65013
R"(.*LoadNetworkCreateDefaultExecGraphResult.*)",
// Not expected behavior
R"(.*Behavior.*ExecNetSetPrecision.*canSetOutputPrecisionForNetwork.*U8.*)",
R"(.*CoreThreadingTestsWithIterations.*)",
R"(.*OVExecutableNetworkBaseTest.*CanSetConfigToExecNet.*)",
R"(.*OVExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableWithIncorrectConfig.*)",
R"(.*OVClassNetworkTestP.*(SetAffinityWithConstantBranches|SetAffinityWithKSO).*)",
};
}

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "behavior/stress_tests.hpp"
#include "stress_tests/stress_tests.hpp"
using namespace LayerTestsDefinitions;

View File

@ -4,65 +4,14 @@
#pragma once
#include <typeindex>
#include <string>
#include <vector>
#include <memory>
#include <tuple>
#include <gtest/gtest.h>
#include <ngraph/node.hpp>
#include <ngraph/function.hpp>
#include <ie_plugin_config.hpp>
#include <ngraph/function.hpp>
#include <ngraph_functions/subgraph_builders.hpp>
#include "gtest/gtest.h"
#include "common_test_utils/common_utils.hpp"
#include "common_test_utils/test_common.hpp"
#include "ov_behavior_test_utils.hpp"
#include "functional_test_utils/skip_tests_config.hpp"
#include "functional_test_utils/plugin_cache.hpp"
#include "functional_test_utils/blob_utils.hpp"
#include "functional_test_utils/precision_utils.hpp"
#include "ngraph_functions/utils/ngraph_helpers.hpp"
#include "ngraph_functions/pass/convert_prc.hpp"
namespace BehaviorTestsUtils {
using namespace CommonTestUtils;
using BehaviorParamsEmptyConfig = std::tuple<
InferenceEngine::Precision, // Network precision
std::string // Device name
>;
class BehaviorTestsEmptyConfig : public testing::WithParamInterface<BehaviorParamsEmptyConfig>,
public CommonTestUtils::TestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<BehaviorParamsEmptyConfig> obj) {
InferenceEngine::Precision netPrecision;
std::string targetDevice;
std::tie(netPrecision, targetDevice) = obj.param;
std::ostringstream result;
result << "netPRC=" << netPrecision.name() << "_";
result << "targetDevice=" << targetDevice;
return result.str();
}
void SetUp() override {
std::tie(netPrecision, targetDevice) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu();
}
void TearDown() override {
function.reset();
}
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
std::shared_ptr<ngraph::Function> function;
InferenceEngine::Precision netPrecision;
std::string targetDevice;
};
typedef std::tuple<
InferenceEngine::Precision, // Network precision
std::string, // Device name
@ -86,7 +35,7 @@ public:
return result.str();
}
void SetUp() override {
void SetUp() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
std::tie(netPrecision, targetDevice, configuration) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu();
@ -96,7 +45,6 @@ public:
if (!configuration.empty()) {
PluginCache::get().reset();
}
function.reset();
}
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
@ -142,7 +90,6 @@ public:
if (!configuration.empty()) {
PluginCache::get().reset();
}
function.reset();
}
protected:
@ -150,91 +97,44 @@ protected:
InferenceEngine::ExecutableNetwork execNet;
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
std::shared_ptr<ngraph::Function> function;
InferenceEngine::Precision netPrecision;
std::string targetDevice;
std::map<std::string, std::string> configuration;
};
using BehaviorParamsSingleOption = std::tuple<
InferenceEngine::Precision, // Network precision
std::string, // Device name
std::string // Key
>;
inline InferenceEngine::Core createIECoreWithTemplate() {
PluginCache::get().reset();
InferenceEngine::Core ie;
std::string pluginName = "templatePlugin";
pluginName += IE_BUILD_POSTFIX;
ie.RegisterPlugin(pluginName, "TEMPLATE");
return ie;
}
class BehaviorTestsSingleOption : public testing::WithParamInterface<BehaviorParamsSingleOption>,
public CommonTestUtils::TestsCommon {
class IEClassNetworkTest : public ov::test::behavior::OVClassNetworkTest {
public:
void SetUp() override {
std::tie(netPrecision, targetDevice, key) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu();
}
InferenceEngine::CNNNetwork actualCnnNetwork, simpleCnnNetwork, multinputCnnNetwork, ksoCnnNetwork;
void TearDown() override {
function.reset();
void SetUp() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED();
OVClassNetworkTest::SetUp();
// Generic network
ASSERT_NO_THROW(actualCnnNetwork = InferenceEngine::CNNNetwork(actualNetwork));
// Quite simple network
ASSERT_NO_THROW(simpleCnnNetwork = InferenceEngine::CNNNetwork(simpleNetwork));
// Multinput to substruct network
ASSERT_NO_THROW(multinputCnnNetwork = InferenceEngine::CNNNetwork(multinputNetwork));
// Network with KSO
ASSERT_NO_THROW(ksoCnnNetwork = InferenceEngine::CNNNetwork(ksoNetwork));
}
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
std::shared_ptr<ngraph::Function> function;
InferenceEngine::Precision netPrecision;
std::string targetDevice;
std::string key;
};
using BehaviorParamsSingleOptionDefault = std::tuple<
InferenceEngine::Precision, // Network precision
std::string, // Device name
std::pair<std::string, InferenceEngine::Parameter> // Configuration key and its default value
>;
class BehaviorTestsSingleOptionDefault : public testing::WithParamInterface<BehaviorParamsSingleOptionDefault>,
public CommonTestUtils::TestsCommon {
class IEClassBaseTestP : public IEClassNetworkTest, public ::testing::WithParamInterface<std::string> {
public:
void SetUp() override {
std::pair<std::string, InferenceEngine::Parameter> entry;
std::tie(netPrecision, targetDevice, entry) = this->GetParam();
std::tie(key, value) = entry;
function = ngraph::builder::subgraph::makeConvPoolRelu();
std::string deviceName;
void SetUp() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED();
IEClassNetworkTest::SetUp();
deviceName = GetParam();
}
void TearDown() override {
function.reset();
}
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
std::shared_ptr<ngraph::Function> function;
InferenceEngine::Precision netPrecision;
std::string targetDevice;
std::string key;
InferenceEngine::Parameter value;
};
using BehaviorParamsSingleOptionCustom = std::tuple<
InferenceEngine::Precision, // Network precision
std::string, // Device name
std::tuple<std::string, std::string, InferenceEngine::Parameter> // Configuration key, value and reference
>;
class BehaviorTestsSingleOptionCustom : public testing::WithParamInterface<BehaviorParamsSingleOptionCustom>,
public CommonTestUtils::TestsCommon {
public:
void SetUp() override {
std::tuple<std::string, std::string, InferenceEngine::Parameter> entry;
std::tie(netPrecision, targetDevice, entry) = this->GetParam();
std::tie(key, value, reference) = entry;
function = ngraph::builder::subgraph::makeConvPoolRelu();
}
void TearDown() override {
function.reset();
}
std::shared_ptr<InferenceEngine::Core> ie = PluginCache::get().ie();
std::shared_ptr<ngraph::Function> function;
InferenceEngine::Precision netPrecision;
std::string targetDevice;
std::string key;
std::string value;
InferenceEngine::Parameter reference;
};
} // namespace BehaviorTestsUtils
} // namespace BehaviorTestsUtils

View File

@ -6,111 +6,38 @@
#include <gtest/gtest.h>
#include <memory>
#include <string>
#include <tuple>
#include <typeindex>
#include <vector>
#include "ngraph_functions/subgraph_builders.hpp"
#include "common_test_utils/test_common.hpp"
#include "common_test_utils/test_constants.hpp"
#include "common_test_utils/common_utils.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
#include "functional_test_utils/skip_tests_config.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
#include "openvino/runtime/runtime.hpp"
#include "functional_test_utils/blob_utils.hpp"
namespace ov {
namespace test {
namespace behavior {
using BehaviorParamsEmptyConfig = std::tuple<ov::element::Type, // element type
std::string>; // device
class BehaviorTestsEmptyConfig : public testing::WithParamInterface<BehaviorParamsEmptyConfig>,
public CommonTestUtils::TestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<BehaviorParamsEmptyConfig> obj) {
std::string targetDevice;
ov::element::Type elementType;
std::tie(elementType, targetDevice) = obj.param;
std::ostringstream result;
result << "element_type=" << elementType;
result << "targetDevice=" << targetDevice;
return result.str();
}
typedef std::tuple<
std::string, // Device name
std::map<std::string, std::string> // Config
> InferRequestParams;
void SetUp() override {
std::tie(elementType, targetDevice) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
}
void TearDown() override {
function.reset();
}
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::string targetDevice;
ov::element::Type elementType;
};
using BehaviorBasicParams = std::tuple<ov::element::Type, // element type
std::string, // device
std::map<std::string, std::string>>; // config
class BehaviorTestsBasic : public testing::WithParamInterface<BehaviorBasicParams>,
public CommonTestUtils::TestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<BehaviorBasicParams> obj) {
std::string targetDevice;
ov::element::Type elementType;
std::map<std::string, std::string> configuration;
std::tie(elementType, targetDevice, configuration) = obj.param;
std::ostringstream result;
result << "element_type=" << elementType << "_";
result << "targetDevice=" << targetDevice << "_";
if (!configuration.empty()) {
for (auto& configItem : configuration) {
result << "configItem=" << configItem.first << "_" << configItem.second << "_";
}
}
return result.str();
}
void SetUp() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
std::tie(elementType, targetDevice, configuration) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
}
void TearDown() override {
if (!configuration.empty()) {
PluginCache::get().reset();
}
function.reset();
}
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::string targetDevice;
std::map<std::string, std::string> configuration;
ov::element::Type elementType;
};
using InferRequestParams = std::tuple<ov::element::Type, // element type
std::string, // device
std::map<std::string, std::string>>; // config
class InferRequestTests : public testing::WithParamInterface<InferRequestParams>, public CommonTestUtils::TestsCommon {
class OVInferRequestTests : public testing::WithParamInterface<InferRequestParams>,
public CommonTestUtils::TestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<InferRequestParams> obj) {
std::string targetDevice;
ov::element::Type elementType;
std::map<std::string, std::string> configuration;
std::tie(elementType, targetDevice, configuration) = obj.param;
std::tie(targetDevice, configuration) = obj.param;
std::ostringstream result;
result << "element_type=" << elementType;
result << "targetDevice=" << targetDevice << "_";
if (!configuration.empty()) {
for (auto& configItem : configuration) {
using namespace CommonTestUtils;
for (auto &configItem : configuration) {
result << "configItem=" << configItem.first << "_" << configItem.second << "_";
}
}
@ -120,108 +47,86 @@ public:
void SetUp() override {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
std::tie(elementType, targetDevice, configuration) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
// Load CNNNetwork to target plugins
execNet = ie->compile_model(function, targetDevice, configuration);
std::tie(targetDevice, configuration) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu();
}
void TearDown() override {
if (!configuration.empty()) {
PluginCache::get().reset();
utils::PluginCache::get().reset();
}
function.reset();
}
protected:
ov::runtime::ExecutableNetwork execNet;
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::shared_ptr<ov::runtime::Core> core = utils::PluginCache::get().core();;
std::string targetDevice;
std::map<std::string, std::string> configuration;
ov::element::Type elementType;
std::shared_ptr<ov::Function> function;
};
using BehaviorParamsSingleOption = std::tuple<ov::element::Type, // element type
std::string, // device
std::string>; // key
inline ov::runtime::Core createCoreWithTemplate() {
ov::test::utils::PluginCache::get().reset();
ov::runtime::Core core;
std::string pluginName = "templatePlugin";
pluginName += IE_BUILD_POSTFIX;
core.register_plugin(pluginName, CommonTestUtils::DEVICE_TEMPLATE);
return core;
}
class BehaviorTestsSingleOption : public testing::WithParamInterface<BehaviorParamsSingleOption>,
public CommonTestUtils::TestsCommon {
class OVClassNetworkTest : public ::testing::Test {
public:
std::shared_ptr<ngraph::Function> actualNetwork, simpleNetwork, multinputNetwork, ksoNetwork;
void SetUp() override {
std::tie(elementType, targetDevice, key) = this->GetParam();
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
SKIP_IF_CURRENT_TEST_IS_DISABLED();
// Generic network
actualNetwork = ngraph::builder::subgraph::makeSplitConvConcat();
// Quite simple network
simpleNetwork = ngraph::builder::subgraph::makeSingleConv();
// Multinput to substruct network
multinputNetwork = ngraph::builder::subgraph::make2InputSubtract();
// Network with KSO
ksoNetwork = ngraph::builder::subgraph::makeKSOFunction();
}
void TearDown() override {
function.reset();
}
virtual void setHeteroNetworkAffinity(const std::string &targetDevice) {
const std::map<std::string, std::string> deviceMapping = {{"Split_2", targetDevice},
{"Convolution_4", targetDevice},
{"Convolution_7", CommonTestUtils::DEVICE_CPU},
{"Relu_5", CommonTestUtils::DEVICE_CPU},
{"Relu_8", targetDevice},
{"Concat_9", CommonTestUtils::DEVICE_CPU}};
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::string targetDevice;
std::string key;
ov::element::Type elementType;
for (const auto &op : actualNetwork->get_ops()) {
auto it = deviceMapping.find(op->get_friendly_name());
if (it != deviceMapping.end()) {
std::string affinity = it->second;
op->get_rt_info()["affinity"] = std::make_shared<ngraph::VariantWrapper<std::string>>(affinity);
}
}
}
};
using BehaviorParamsSingleOptionDefault =
std::tuple<ov::element::Type, // element type
std::string, // Device name
std::pair<std::string, ov::runtime::Parameter> // Configuration key and its default value
>;
class BehaviorTestsSingleOptionDefault : public testing::WithParamInterface<BehaviorParamsSingleOptionDefault>,
public CommonTestUtils::TestsCommon {
class OVClassBaseTestP : public OVClassNetworkTest, public ::testing::WithParamInterface<std::string> {
public:
std::string deviceName;
void SetUp() override {
std::pair<std::string, ov::runtime::Parameter> entry;
std::tie(elementType, targetDevice, entry) = this->GetParam();
std::tie(key, value) = entry;
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
SKIP_IF_CURRENT_TEST_IS_DISABLED();
OVClassNetworkTest::SetUp();
deviceName = GetParam();
}
void TearDown() override {
function.reset();
}
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::string targetDevice;
std::string key;
ov::runtime::Parameter value;
ov::element::Type elementType;
};
using BehaviorParamsSingleOptionCustom =
std::tuple<ov::element::Type, // element type
std::string, // Device name
std::tuple<std::string, std::string, ov::runtime::Parameter> // Configuration key, value and
// reference
>;
class BehaviorTestsSingleOptionCustom : public testing::WithParamInterface<BehaviorParamsSingleOptionCustom>,
public CommonTestUtils::TestsCommon {
public:
void SetUp() override {
std::tuple<std::string, std::string, ov::runtime::Parameter> entry;
std::tie(elementType, targetDevice, entry) = this->GetParam();
std::tie(key, value, reference) = entry;
function = ngraph::builder::subgraph::makeConvPoolRelu({1, 1, 32, 32}, elementType);
}
void TearDown() override {
function.reset();
}
std::shared_ptr<ov::runtime::Core> ie = PluginCache::get().core();
std::shared_ptr<ngraph::Function> function;
std::string targetDevice;
std::string key;
std::string value;
ov::runtime::Parameter reference;
ov::element::Type elementType;
};
} // namespace test
} // namespace ov
#define SKIP_IF_NOT_IMPLEMENTED(...) \
{ \
try { \
__VA_ARGS__; \
} catch (const InferenceEngine::NotImplemented&) { \
GTEST_SKIP(); \
} \
}
} // namespace behavior
} // namespace test
} // namespace ov

View File

@ -1,323 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <tuple>
#include <vector>
#include <string>
#include <memory>
#include "ie_extension.h"
#include <condition_variable>
#include "shared_test_classes/base/layer_test_utils.hpp"
#include "ngraph_functions/utils/ngraph_helpers.hpp"
#include "ngraph_functions/builders.hpp"
#include <ie_plugin_config.hpp>
#include <vpu/vpu_plugin_config.hpp>
#include <gna/gna_config.hpp>
#include <ie_core.hpp>
#include "ie_common.h"
#include "common_test_utils/common_utils.hpp"
#include "common_test_utils/file_utils.hpp"
#include "functional_test_utils/plugin_cache.hpp"
#include "functional_test_utils/blob_utils.hpp"
#include <threading/ie_executor_manager.hpp>
#include <base/behavior_test_utils.hpp>
#include "ngraph_functions/pass/convert_prc.hpp"
#include "ngraph_functions/subgraph_builders.hpp"
namespace BehaviorTestsDefinitions {
using EmptyConfigTests = BehaviorTestsUtils::BehaviorTestsEmptyConfig;
// Setting empty config doesn't throw
TEST_P(EmptyConfigTests, SetEmptyConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
std::map<std::string, std::string> config;
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_NO_THROW(ie->SetConfig(config, targetDevice));
}
TEST_P(EmptyConfigTests, CanLoadNetworkWithEmptyConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
std::map<std::string, std::string> config;
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, config));
}
using CorrectSingleOptionDefaultValueConfigTests = BehaviorTestsUtils::BehaviorTestsSingleOptionDefault;
TEST_P(CorrectSingleOptionDefaultValueConfigTests, CheckDefaultValueOfConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_EQ(ie->GetConfig(targetDevice, key), value);
}
using CorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic;
// Setting correct config doesn't throw
TEST_P(CorrectConfigTests, SetCorrectConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice));
}
TEST_P(CorrectConfigTests, CanLoadNetworkWithCorrectConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration));
}
TEST_P(CorrectConfigTests, CanUseCache) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ie->SetConfig({ { CONFIG_KEY(CACHE_DIR), "./test_cache" } });
ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration));
ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration));
CommonTestUtils::removeDir("./test_cache");
}
using CorrectSingleOptionCustomValueConfigTests = BehaviorTestsUtils::BehaviorTestsSingleOptionCustom;
TEST_P(CorrectSingleOptionCustomValueConfigTests, CheckCustomValueOfConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
std::map<std::string, std::string> configuration = {{key, value}};
ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice));
ASSERT_EQ(ie->GetConfig(targetDevice, key), reference);
}
using CorrectConfigPublicOptionsTests = BehaviorTestsUtils::BehaviorTestsSingleOption;
TEST_P(CorrectConfigPublicOptionsTests, CanSeePublicOption) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
InferenceEngine::Parameter metric;
ASSERT_NO_THROW(metric = ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
const auto& supportedOptions = metric.as<std::vector<std::string>>();
ASSERT_NE(std::find(supportedOptions.cbegin(), supportedOptions.cend(), key), supportedOptions.cend());
}
using CorrectConfigPrivateOptionsTests = BehaviorTestsUtils::BehaviorTestsSingleOption;
TEST_P(CorrectConfigPrivateOptionsTests, CanNotSeePrivateOption) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
InferenceEngine::Parameter metric;
ASSERT_NO_THROW(metric = ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
const auto& supportedOptions = metric.as<std::vector<std::string>>();
ASSERT_EQ(std::find(supportedOptions.cbegin(), supportedOptions.cend(), key), supportedOptions.cend());
}
using DefaultValuesConfigTests = BehaviorTestsUtils::BehaviorTestsBasic;
TEST_P(DefaultValuesConfigTests, CanSetDefaultValueBackToPlugin) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
InferenceEngine::CNNNetwork cnnNet(function);
InferenceEngine::Parameter metric;
ASSERT_NO_THROW(metric = ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
std::vector<std::string> keys = metric;
for (auto& key : keys) {
InferenceEngine::Parameter configValue;
ASSERT_NO_THROW(configValue = ie->GetConfig(targetDevice, key));
ASSERT_NO_THROW(ie->SetConfig({{ key, configValue.as<std::string>()}}, targetDevice))
<< "device=" << targetDevice << " "
<< "config key=" << key << " "
<< "value=" << configValue.as<std::string>();
}
}
using IncorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic;
TEST_P(IncorrectConfigTests, SetConfigWithIncorrectKey) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_THROW(ie->SetConfig(configuration, targetDevice), InferenceEngine::Exception);
}
TEST_P(IncorrectConfigTests, CanNotLoadNetworkWithIncorrectConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_THROW(auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration),
InferenceEngine::Exception);
}
using IncorrectConfigSingleOptionTests = BehaviorTestsUtils::BehaviorTestsSingleOption;
TEST_P(IncorrectConfigSingleOptionTests, CanNotGetConfigWithIncorrectConfig) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
ASSERT_THROW(ie->GetConfig(targetDevice, key), InferenceEngine::Exception);
}
using IncorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic;
TEST_P(IncorrectConfigAPITests, SetConfigWithNoExistingKey) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
if (targetDevice.find(CommonTestUtils::DEVICE_GNA) != std::string::npos) {
ASSERT_THROW(ie->SetConfig(configuration, targetDevice), InferenceEngine::NotFound);
} else {
ASSERT_THROW(ie->SetConfig(configuration, targetDevice), InferenceEngine::Exception);
}
}
using CorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic;
TEST_P(CorrectConfigAPITests, canLoadCorrectNetworkAndCheckConfig) {
InferenceEngine::CNNNetwork cnnNet(function);
auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration);
for (const auto& configItem : configuration) {
InferenceEngine::Parameter param;
ASSERT_NO_THROW(param = execNet.GetConfig(configItem.first));
ASSERT_FALSE(param.empty());
ASSERT_EQ(param, InferenceEngine::Parameter(configItem.second));
}
}
TEST_P(CorrectConfigAPITests, canSetCorrectConfigLoadNetworkAndCheckConfig) {
InferenceEngine::CNNNetwork cnnNet(function);
ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice));
auto execNet = ie->LoadNetwork(cnnNet, targetDevice);
for (const auto& configItem : configuration) {
InferenceEngine::Parameter param;
ASSERT_NO_THROW(param = execNet.GetConfig(configItem.first));
ASSERT_FALSE(param.empty());
ASSERT_EQ(param, InferenceEngine::Parameter(configItem.second));
}
}
TEST_P(CorrectConfigAPITests, CanSetExclusiveAsyncRequests) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
// Load config
std::map<std::string, std::string> config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)}};
config.insert(configuration.begin(), configuration.end());
if (targetDevice.find(CommonTestUtils::DEVICE_AUTO) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) {
ASSERT_NO_THROW(ie->SetConfig(config, targetDevice));
}
// Load CNNNetwork to target plugins
auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config);
execNet.CreateInferRequest();
if ((targetDevice == CommonTestUtils::DEVICE_HDDL) || (targetDevice == CommonTestUtils::DEVICE_GNA)) {
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
} else if ((targetDevice == CommonTestUtils::DEVICE_KEEMBAY) ||
(targetDevice == CommonTestUtils::DEVICE_MYRIAD)) {
ASSERT_EQ(2u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
} else if ((targetDevice == CommonTestUtils::DEVICE_MULTI) ||
(targetDevice == CommonTestUtils::DEVICE_AUTO)) {
} else {
ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
}
}
TEST_P(CorrectConfigAPITests, WithoutExclusiveAsyncRequests) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
// Load config
std::map<std::string, std::string> config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(NO)}};
config.insert(configuration.begin(), configuration.end());
if (targetDevice.find(CommonTestUtils::DEVICE_AUTO) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) {
ASSERT_NO_THROW(ie->SetConfig(config, targetDevice));
}
// Load CNNNetwork to target plugins
auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config);
execNet.CreateInferRequest();
if ((targetDevice == CommonTestUtils::DEVICE_MYRIAD) ||
(targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) {
ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
} else if ((targetDevice == CommonTestUtils::DEVICE_AUTO) ||
(targetDevice == CommonTestUtils::DEVICE_MULTI)) {
} else {
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
}
}
TEST_P(CorrectConfigAPITests, ReusableCPUStreamsExecutor) {
// Skip test according to plugin specific disabledTestPatterns() (if any)
SKIP_IF_CURRENT_TEST_IS_DISABLED()
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber());
// Create CNNNetwork from ngrpah::Function
InferenceEngine::CNNNetwork cnnNet(function);
{
// Load config
std::map<std::string, std::string> config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(NO)}};
config.insert(configuration.begin(), configuration.end());
if (targetDevice.find(CommonTestUtils::DEVICE_AUTO) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos &&
targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) {
ASSERT_NO_THROW(ie->SetConfig(config, targetDevice));
}
// Load CNNNetwork to target plugins
auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config);
execNet.CreateInferRequest();
if ((targetDevice == CommonTestUtils::DEVICE_MYRIAD) ||
(targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) {
ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber());
} else if ((targetDevice == CommonTestUtils::DEVICE_AUTO) ||
(targetDevice == CommonTestUtils::DEVICE_MULTI)) {
} else {
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
ASSERT_GE(2u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber());
}
}
if (targetDevice == CommonTestUtils::DEVICE_CPU) {
ASSERT_NE(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber());
ASSERT_NO_THROW(ie->UnregisterPlugin("CPU"));
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber());
ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber());
}
}
} // namespace BehaviorTestsDefinitions

Some files were not shown because too many files have changed in this diff Show More