Enable more tests for Template plugin (#16874)

* Enable more tests for Template plugin

* Removed deprecated API

* Fixed typo

* Added internal properties

* Removed incorrect tests

* Fixed code style

* Enabled some tests
This commit is contained in:
Ilya Churaev 2023-04-17 11:07:09 +04:00 committed by GitHub
parent 7282728cec
commit aa1f26a2b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 199 additions and 228 deletions

View File

@ -43,6 +43,7 @@ As an example, a plugin configuration has three value parameters:
- `streams_executor_config` - configuration of `ov::threading::IStreamsExecutor` to handle settings of multi-threaded context. - `streams_executor_config` - configuration of `ov::threading::IStreamsExecutor` to handle settings of multi-threaded context.
- `performance_mode` - configuration of `ov::hint::PerformanceMode` to set the performance mode. - `performance_mode` - configuration of `ov::hint::PerformanceMode` to set the performance mode.
- `disable_transformations` - allows to disable transformations which are applied in the process of model compilation. - `disable_transformations` - allows to disable transformations which are applied in the process of model compilation.
- `exclusive_async_requests` - allows to use exclusive task executor for asynchronous infer requests.
### Plugin Constructor ### Plugin Constructor

View File

@ -10,7 +10,7 @@
#pragma once #pragma once
#include "ie_plugin_config.hpp" #include "ie_plugin_config.hpp"
#include "openvino/runtime/properties.hpp" #include "openvino/runtime/internal_properties.hpp"
namespace InferenceEngine { namespace InferenceEngine {
@ -120,14 +120,3 @@ DECLARE_CONFIG_VALUE(DISABLE);
} // namespace PluginConfigInternalParams } // namespace PluginConfigInternalParams
} // namespace InferenceEngine } // namespace InferenceEngine
namespace ov {
/**
* @brief Read-only property to get a std::vector<PropertyName> of properties
* which should affect the hash calculation for model cache
* @ingroup ie_dev_api_plugin_api
*/
static constexpr Property<std::vector<PropertyName>, PropertyMutability::RO> caching_properties{"CACHING_PROPERTIES"};
} // namespace ov

View File

@ -0,0 +1,29 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief A header for internal properties that are passed from one plugin to another
* @file openvino/runtime/internal_properties.hpp
*/
#pragma once
#include "openvino/runtime/properties.hpp"
namespace ov {
/**
* @brief Read-only property to get a std::vector<PropertyName> of properties
* which should affect the hash calculation for model cache
* @ingroup ov_dev_api_plugin_api
*/
static constexpr Property<std::vector<PropertyName>, PropertyMutability::RO> caching_properties{"CACHING_PROPERTIES"};
/**
* @brief Allow to create exclusive_async_requests with one executor
* @ingroup ov_dev_api_plugin_api
*/
static constexpr Property<bool, PropertyMutability::RW> exclusive_async_requests{"EXCLUSIVE_ASYNC_REQUESTS"};
} // namespace ov

View File

@ -42,6 +42,9 @@ namespace ov {
* @defgroup ov_dev_api_compiled_model_api Compiled Model base classes * @defgroup ov_dev_api_compiled_model_api Compiled Model base classes
* @brief A set of base and helper classes to implement an compiled model class * @brief A set of base and helper classes to implement an compiled model class
* *
* @defgroup ov_dev_api_infer_request_api Inference Request common classes
* @brief A set of base and helper classes to implement a common inference request functionality.
*
* @defgroup ov_dev_api_sync_infer_request_api Inference Request base classes * @defgroup ov_dev_api_sync_infer_request_api Inference Request base classes
* @brief A set of base and helper classes to implement a syncrhonous inference request class. * @brief A set of base and helper classes to implement a syncrhonous inference request class.
* *

View File

@ -16,8 +16,6 @@
#include "perf_counter.hpp" #include "perf_counter.hpp"
#include "tensor_conversion_util.hpp" #include "tensor_conversion_util.hpp"
NGRAPH_SUPPRESS_DEPRECATED_START
namespace { namespace {
class DynamicTensor : public ngraph::runtime::HostTensor { class DynamicTensor : public ngraph::runtime::HostTensor {
@ -47,7 +45,6 @@ protected:
}; };
inline ngraph::HostTensorPtr make_tmp_host_tensor(const ov::Tensor& t) { inline ngraph::HostTensorPtr make_tmp_host_tensor(const ov::Tensor& t) {
OPENVINO_SUPPRESS_DEPRECATED_START
if (!t) { if (!t) {
return std::make_shared<DynamicTensor>(ov::element::dynamic); return std::make_shared<DynamicTensor>(ov::element::dynamic);
} else if (t.get_shape() == ov::Shape{0, std::numeric_limits<size_t>::max()}) { } else if (t.get_shape() == ov::Shape{0, std::numeric_limits<size_t>::max()}) {
@ -55,7 +52,6 @@ inline ngraph::HostTensorPtr make_tmp_host_tensor(const ov::Tensor& t) {
} else { } else {
return std::make_shared<ngraph::runtime::HostTensor>(t.get_element_type(), t.get_shape(), t.data()); return std::make_shared<ngraph::runtime::HostTensor>(t.get_element_type(), t.get_shape(), t.data());
} }
OPENVINO_SUPPRESS_DEPRECATED_END
} }
inline ngraph::HostTensorVector create_tmp_tensors(const ov::TensorVector& tensors) { inline ngraph::HostTensorVector create_tmp_tensors(const ov::TensorVector& tensors) {
ngraph::HostTensorVector result; ngraph::HostTensorVector result;
@ -126,10 +122,7 @@ bool ov::runtime::interpreter::INTExecutable::call(std::vector<ov::Tensor>& outp
auto variable = var_extension->get_variable(); auto variable = var_extension->get_variable();
if (!variable_context.get_variable_value(variable)) { if (!variable_context.get_variable_value(variable)) {
auto h_tensor = ov::Tensor(op->get_input_element_type(0), op->get_input_shape(0)); auto h_tensor = ov::Tensor(op->get_input_element_type(0), op->get_input_shape(0));
// h_tensor->write(h_tensor->get_data_ptr(), h_tensor->get_size_in_bytes()); variable_context.set_variable_value(variable, std::make_shared<ov::op::util::VariableValue>(h_tensor));
const auto tensor_input = make_tmp_host_tensor(h_tensor);
variable_context.set_variable_value(variable,
std::make_shared<ov::op::util::VariableValue>(tensor_input));
} }
} }
} }

View File

@ -7,6 +7,7 @@
#include <cpp_interfaces/interface/ie_internal_plugin_config.hpp> #include <cpp_interfaces/interface/ie_internal_plugin_config.hpp>
#include <ie_plugin_config.hpp> #include <ie_plugin_config.hpp>
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp" #include "openvino/runtime/properties.hpp"
#include "template/properties.hpp" #include "template/properties.hpp"
@ -25,14 +26,16 @@ Configuration::Configuration(const ov::AnyMap& config, const Configuration& defa
if (ov::template_plugin::disable_transformations == key) { if (ov::template_plugin::disable_transformations == key) {
disable_transformations = value.as<bool>(); disable_transformations = value.as<bool>();
} else if (ov::exclusive_async_requests == key) {
exclusive_async_requests = value.as<bool>();
} else if (streamExecutorConfigKeys.end() != } else if (streamExecutorConfigKeys.end() !=
std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), key)) { std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), key)) {
streams_executor_config.set_property(key, value); streams_executor_config.set_property(key, value);
} else if (ov::device::id.name() == key) { } else if (ov::device::id == key) {
device_id = std::stoi(value.as<std::string>()); device_id = std::stoi(value.as<std::string>());
OPENVINO_ASSERT(device_id <= 0, "Device ID ", device_id, " is not supported"); OPENVINO_ASSERT(device_id <= 0, "Device ID ", device_id, " is not supported");
} else if (CONFIG_KEY(PERF_COUNT) == key) { } else if (ov::enable_profiling == key) {
perf_count = (CONFIG_VALUE(YES) == value.as<std::string>()); perf_count = value.as<bool>();
} else if (ov::hint::performance_mode == key) { } else if (ov::hint::performance_mode == key) {
std::stringstream strm{value.as<std::string>()}; std::stringstream strm{value.as<std::string>()};
strm >> performance_mode; strm >> performance_mode;
@ -48,10 +51,12 @@ ov::Any Configuration::Get(const std::string& name) const {
if ((streamExecutorConfigKeys.end() != if ((streamExecutorConfigKeys.end() !=
std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), name))) { std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), name))) {
return streams_executor_config.get_property(name); return streams_executor_config.get_property(name);
} else if (name == CONFIG_KEY(DEVICE_ID)) { } else if (name == ov::device::id) {
return {std::to_string(device_id)}; return {std::to_string(device_id)};
} else if (name == CONFIG_KEY(PERF_COUNT)) { } else if (name == ov::enable_profiling) {
return {perf_count}; return {perf_count};
} else if (name == ov::exclusive_async_requests) {
return {exclusive_async_requests};
} else if (name == ov::template_plugin::disable_transformations) { } else if (name == ov::template_plugin::disable_transformations) {
return {disable_transformations}; return {disable_transformations};
} else if (name == ov::num_streams) { } else if (name == ov::num_streams) {

View File

@ -35,6 +35,7 @@ struct Configuration {
ov::threading::IStreamsExecutor::Config streams_executor_config; ov::threading::IStreamsExecutor::Config streams_executor_config;
ov::hint::PerformanceMode performance_mode = ov::hint::PerformanceMode::LATENCY; ov::hint::PerformanceMode performance_mode = ov::hint::PerformanceMode::LATENCY;
bool disable_transformations = false; bool disable_transformations = false;
bool exclusive_async_requests = false;
}; };
// ! [configuration:header] // ! [configuration:header]

View File

@ -6,11 +6,11 @@
#include <memory> #include <memory>
#include "cpp_interfaces/interface/ie_internal_plugin_config.hpp"
#include "cpp_interfaces/interface/ie_iplugin_internal.hpp" #include "cpp_interfaces/interface/ie_iplugin_internal.hpp"
#include "ie_plugin_config.hpp" #include "ie_plugin_config.hpp"
#include "itt.hpp" #include "itt.hpp"
#include "openvino/pass/manager.hpp" #include "openvino/pass/manager.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp" #include "openvino/runtime/properties.hpp"
#include "remote_context.hpp" #include "remote_context.hpp"
#include "template/properties.hpp" #include "template/properties.hpp"
@ -23,6 +23,7 @@
namespace { namespace {
static constexpr const char* wait_executor_name = "TemplateWaitExecutor"; static constexpr const char* wait_executor_name = "TemplateWaitExecutor";
static constexpr const char* stream_executor_name = "TemplateStreamsExecutor"; static constexpr const char* stream_executor_name = "TemplateStreamsExecutor";
static constexpr const char* template_exclusive_executor = "TemplateExecutor";
} // namespace } // namespace
// ! [plugin:ctor] // ! [plugin:ctor]
@ -43,8 +44,6 @@ ov::template_plugin::Plugin::~Plugin() {
// Plugin should remove executors from executor cache to avoid threads number growth in the whole application // Plugin should remove executors from executor cache to avoid threads number growth in the whole application
get_executor_manager()->clear(stream_executor_name); get_executor_manager()->clear(stream_executor_name);
get_executor_manager()->clear(wait_executor_name); get_executor_manager()->clear(wait_executor_name);
// NOTE: Uncomment this if Inference Engine Executor cache is used to create callback executor
// executorManager()->clear("TemplateCallbackExecutor");
} }
// ! [plugin:dtor] // ! [plugin:dtor]
@ -106,11 +105,13 @@ std::shared_ptr<ov::ICompiledModel> ov::template_plugin::Plugin::compile_model(
auto streamsExecutorConfig = auto streamsExecutorConfig =
ov::threading::IStreamsExecutor::Config::make_default_multi_threaded(fullConfig.streams_executor_config); ov::threading::IStreamsExecutor::Config::make_default_multi_threaded(fullConfig.streams_executor_config);
streamsExecutorConfig._name = stream_executor_name; streamsExecutorConfig._name = stream_executor_name;
auto compiled_model = auto compiled_model = std::make_shared<CompiledModel>(
std::make_shared<CompiledModel>(model->clone(), model->clone(),
shared_from_this(), shared_from_this(),
context, context,
get_executor_manager()->get_idle_cpu_streams_executor(streamsExecutorConfig), fullConfig.exclusive_async_requests
? get_executor_manager()->get_executor(template_exclusive_executor)
: get_executor_manager()->get_idle_cpu_streams_executor(streamsExecutorConfig),
fullConfig); fullConfig);
return compiled_model; return compiled_model;
} }
@ -233,6 +234,7 @@ ov::Any ov::template_plugin::Plugin::get_property(const std::string& name, const
std::vector<ov::PropertyName> rw_properties{ov::device::id, std::vector<ov::PropertyName> rw_properties{ov::device::id,
ov::enable_profiling, ov::enable_profiling,
ov::hint::performance_mode, ov::hint::performance_mode,
ov::exclusive_async_requests,
ov::template_plugin::disable_transformations}; ov::template_plugin::disable_transformations};
return rw_properties; return rw_properties;
}; };

View File

@ -3,6 +3,7 @@
// //
#include "behavior/ov_executable_network/get_metric.hpp" #include "behavior/ov_executable_network/get_metric.hpp"
#include "behavior/ov_plugin/properties_tests.hpp" #include "behavior/ov_plugin/properties_tests.hpp"
#include "openvino/runtime/core.hpp" #include "openvino/runtime/core.hpp"
@ -15,10 +16,8 @@ namespace {
// IE Class Common tests with <pluginName, deviceName params> // IE Class Common tests with <pluginName, deviceName params>
// //
INSTANTIATE_TEST_SUITE_P(smoke_OVClassImportExportTestP,
OVClassExecutableNetworkImportExportTestP,
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassImportExportTestP, OVClassExecutableNetworkImportExportTestP,
::testing::Values("HETERO:TEMPLATE")); ::testing::Values("HETERO:TEMPLATE"));
// //
@ -27,28 +26,27 @@ INSTANTIATE_TEST_SUITE_P(
std::vector<std::string> devices = {"TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE", "AUTO:TEMPLATE"}; std::vector<std::string> devices = {"TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE", "AUTO:TEMPLATE"};
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::ValuesIn(devices)); ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS, OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::ValuesIn(devices)); ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_NETWORK_NAME, OVClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::ValuesIn(devices)); ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS, OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::ValuesIn(devices)); ::testing::ValuesIn(devices));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported, OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
::testing::ValuesIn(devices)); ::testing::ValuesIn(devices));
const std::vector<ov::AnyMap> multiModelPriorityConfigs = { const std::vector<ov::AnyMap> multiModelPriorityConfigs = {{ov::hint::model_priority(ov::hint::Priority::HIGH)},
{ov::hint::model_priority(ov::hint::Priority::HIGH)},
{ov::hint::model_priority(ov::hint::Priority::MEDIUM)}, {ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
{ov::hint::model_priority(ov::hint::Priority::LOW)}, {ov::hint::model_priority(ov::hint::Priority::LOW)},
{ov::hint::model_priority(ov::hint::Priority::DEFAULT)}}; {ov::hint::model_priority(ov::hint::Priority::DEFAULT)}};
@ -58,8 +56,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
::testing::Combine(::testing::Values("AUTO:TEMPLATE"), ::testing::Combine(::testing::Values("AUTO:TEMPLATE"),
::testing::ValuesIn(multiModelPriorityConfigs))); ::testing::ValuesIn(multiModelPriorityConfigs)));
const std::vector<ov::AnyMap> multiDevicePriorityConfigs = { const std::vector<ov::AnyMap> multiDevicePriorityConfigs = {{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE)}};
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE)}};
INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest, INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
OVClassExecutableNetworkGetMetricTest_DEVICE_PRIORITY, OVClassExecutableNetworkGetMetricTest_DEVICE_PRIORITY,
@ -71,35 +68,27 @@ INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
// Executable Network GetConfig / SetConfig // Executable Network GetConfig / SetConfig
// //
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetConfigTest,
smoke_OVClassExecutableNetworkGetConfigTest, OVClassExecutableNetworkGetConfigTest, OVClassExecutableNetworkGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkSetConfigTest,
smoke_OVClassExecutableNetworkSetConfigTest, OVClassExecutableNetworkSetConfigTest, OVClassExecutableNetworkSetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
//// ////
//// Hetero Executable Network GetMetric //// Hetero Executable Network GetMetric
//// ////
// //
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassHeteroExecutableNetworkGetMetricTest,
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassHeteroExecutableNetworkGetMetricTest,
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS, OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(smoke_OVClassHeteroExecutableNetworkGetMetricTest,
INSTANTIATE_TEST_SUITE_P( OVClassHeteroExecutableNetworkGetMetricTest_EXEC_DEVICES,
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassHeteroExecutableNetworkGetMetricTest, OVClassHeteroExecutableNetworkGetMetricTest_EXEC_DEVICES,
::testing::Values("TEMPLATE.0")); ::testing::Values("TEMPLATE.0"));
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////

View File

@ -3,6 +3,7 @@
// //
#include "behavior/ov_plugin/properties_tests.hpp" #include "behavior/ov_plugin/properties_tests.hpp"
#include "openvino/runtime/properties.hpp" #include "openvino/runtime/properties.hpp"
using namespace ov::test::behavior; using namespace ov::test::behavior;
@ -21,43 +22,41 @@ const std::vector<ov::AnyMap> multi_inproperties = {
{ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")}, {ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")},
}; };
const std::vector<ov::AnyMap> auto_inproperties = { const std::vector<ov::AnyMap> auto_inproperties = {
{ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")}, {ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")},
}; };
const std::vector<ov::AnyMap> auto_batch_inproperties = { const std::vector<ov::AnyMap> auto_batch_inproperties = {
{ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")}, {ov::device::id("UNSUPPORTED_DEVICE_ID_STRING")},
}; };
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_BehaviorTests, OVPropertiesIncorrectTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
::testing::Combine( OVPropertiesIncorrectTests,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(inproperties)), ::testing::ValuesIn(inproperties)),
OVPropertiesIncorrectTests::getTestCaseName); OVPropertiesIncorrectTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Hetero_BehaviorTests, OVPropertiesIncorrectTests, INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
::testing::Combine( OVPropertiesIncorrectTests,
::testing::Values(CommonTestUtils::DEVICE_HETERO), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(hetero_inproperties)), ::testing::ValuesIn(hetero_inproperties)),
OVPropertiesIncorrectTests::getTestCaseName); OVPropertiesIncorrectTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Multi_BehaviorTests, OVPropertiesIncorrectTests, INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
::testing::Combine( OVPropertiesIncorrectTests,
::testing::Values(CommonTestUtils::DEVICE_MULTI), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multi_inproperties)), ::testing::ValuesIn(multi_inproperties)),
OVPropertiesIncorrectTests::getTestCaseName); OVPropertiesIncorrectTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests, OVPropertiesIncorrectTests, INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
::testing::Combine( OVPropertiesIncorrectTests,
::testing::Values(CommonTestUtils::DEVICE_AUTO), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::ValuesIn(auto_inproperties)), ::testing::ValuesIn(auto_inproperties)),
OVPropertiesIncorrectTests::getTestCaseName); OVPropertiesIncorrectTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests, OVPropertiesIncorrectTests, INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
::testing::Combine( OVPropertiesIncorrectTests,
::testing::Values(CommonTestUtils::DEVICE_BATCH), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_inproperties)), ::testing::ValuesIn(auto_batch_inproperties)),
OVPropertiesIncorrectTests::getTestCaseName); OVPropertiesIncorrectTests::getTestCaseName);
@ -66,9 +65,9 @@ const std::vector<ov::AnyMap> default_properties = {
{ov::device::id(0)}, {ov::device::id(0)},
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVPropertiesDefaultTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
::testing::Combine( OVPropertiesDefaultTests,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(default_properties)), ::testing::ValuesIn(default_properties)),
OVPropertiesDefaultTests::getTestCaseName); OVPropertiesDefaultTests::getTestCaseName);
@ -82,7 +81,6 @@ const std::vector<ov::AnyMap> hetero_properties = {
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::device::id(0)}, {ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::device::id(0)},
}; };
const std::vector<ov::AnyMap> multi_properties = { const std::vector<ov::AnyMap> multi_properties = {
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::enable_profiling(true)}, {ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::enable_profiling(true)},
{ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::device::id(0)}, {ov::device::priorities(CommonTestUtils::DEVICE_TEMPLATE), ov::device::id(0)},
@ -90,68 +88,65 @@ const std::vector<ov::AnyMap> multi_properties = {
const std::vector<ov::AnyMap> auto_batch_properties = { const std::vector<ov::AnyMap> auto_batch_properties = {
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}}, {{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}},
{{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG) , CommonTestUtils::DEVICE_TEMPLATE}, {{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), CommonTestUtils::DEVICE_TEMPLATE}, {CONFIG_KEY(AUTO_BATCH_TIMEOUT), "1"}},
{CONFIG_KEY(AUTO_BATCH_TIMEOUT) , "1"}},
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVPropertiesTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
::testing::Combine( OVPropertiesTests,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(properties)), ::testing::ValuesIn(properties)),
OVPropertiesTests::getTestCaseName); OVPropertiesTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Hetero_BehaviorTests, OVPropertiesTests, INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
::testing::Combine( OVPropertiesTests,
::testing::Values(CommonTestUtils::DEVICE_HETERO), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(hetero_properties)), ::testing::ValuesIn(hetero_properties)),
OVPropertiesTests::getTestCaseName); OVPropertiesTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Multi_BehaviorTests, OVPropertiesTests, INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
::testing::Combine( OVPropertiesTests,
::testing::Values(CommonTestUtils::DEVICE_MULTI), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::ValuesIn(multi_properties)), ::testing::ValuesIn(multi_properties)),
OVPropertiesTests::getTestCaseName); OVPropertiesTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_AutoBatch_BehaviorTests, OVPropertiesTests, INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
::testing::Combine( OVPropertiesTests,
::testing::Values(CommonTestUtils::DEVICE_BATCH), ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_BATCH),
::testing::ValuesIn(auto_batch_properties)), ::testing::ValuesIn(auto_batch_properties)),
OVPropertiesTests::getTestCaseName); OVPropertiesTests::getTestCaseName);
const std::vector<std::tuple<std::string, std::pair<ov::AnyMap, std::string>>> GetMetricTest_ExecutionDevice_TEMPLATE = { const std::vector<std::tuple<std::string, std::pair<ov::AnyMap, std::string>>> GetMetricTest_ExecutionDevice_TEMPLATE =
{CommonTestUtils::DEVICE_TEMPLATE, std::make_pair(ov::AnyMap{}, CommonTestUtils::DEVICE_TEMPLATE)}}; {{CommonTestUtils::DEVICE_TEMPLATE, std::make_pair(ov::AnyMap{}, "TEMPLATE.0")}};
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassExecutableNetworkGetMetricTest,
smoke_OVClassExecutableNetworkGetMetricTest, OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES, OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES,
::testing::ValuesIn(GetMetricTest_ExecutionDevice_TEMPLATE), ::testing::ValuesIn(GetMetricTest_ExecutionDevice_TEMPLATE),
OVCompileModelGetExecutionDeviceTests::getTestCaseName); OVCompileModelGetExecutionDeviceTests::getTestCaseName);
// //
// OV Class GetMetric // OV Class GetMetric
// //
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVGetMetricPropsTest,
smoke_OVGetMetricPropsTest, OVGetMetricPropsTest, OVGetMetricPropsTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVGetConfigTest,
smoke_OVGetConfigTest, OVGetConfigTest_ThrowUnsupported, OVGetConfigTest_ThrowUnsupported,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVGetAvailableDevicesPropsTest,
smoke_OVGetAvailableDevicesPropsTest, OVGetAvailableDevicesPropsTest, OVGetAvailableDevicesPropsTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
// //
// OV Class GetConfig // OV Class GetConfig
// //
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVGetConfigTest, OVGetConfigTest, ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
smoke_OVGetConfigTest, OVGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(smoke_OVClassBasicPropsTestP,
smoke_OVClassBasicPropsTestP, OVClassBasicPropsTestP, OVClassBasicPropsTestP,
::testing::Values(std::make_pair("openvino_template_plugin", CommonTestUtils::DEVICE_TEMPLATE))); ::testing::Values(std::make_pair("openvino_template_plugin",
CommonTestUtils::DEVICE_TEMPLATE)));
} // namespace } // namespace

View File

@ -4,8 +4,6 @@
#include "behavior/plugin/set_preprocess.hpp" #include "behavior/plugin/set_preprocess.hpp"
#ifdef ENABLE_GAPI_PREPROCESSING
using namespace BehaviorTestsDefinitions; using namespace BehaviorTestsDefinitions;
namespace { namespace {
@ -55,12 +53,10 @@ const std::vector<InferenceEngine::Precision> ioPrecisions = {
}; };
const std::vector<InferenceEngine::Layout> netLayouts = { const std::vector<InferenceEngine::Layout> netLayouts = {
InferenceEngine::Layout::NCHW, InferenceEngine::Layout::NCHW,
// InferenceEngine::Layout::NHWC
}; };
const std::vector<InferenceEngine::Layout> ioLayouts = { const std::vector<InferenceEngine::Layout> ioLayouts = {
InferenceEngine::Layout::NCHW, InferenceEngine::Layout::NCHW,
InferenceEngine::Layout::NHWC
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessConversionTest, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessConversionTest,
@ -77,20 +73,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessConversionTe
::testing::ValuesIn(configs)), ::testing::ValuesIn(configs)),
InferRequestPreprocessConversionTest::getTestCaseName); InferRequestPreprocessConversionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessDynamicallyInSetBlobTest,
::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Bool(),
::testing::Bool(),
::testing::ValuesIn(netLayouts),
::testing::Bool(),
::testing::Bool(),
::testing::Values(true), // only SetBlob
::testing::Values(true), // only SetBlob
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(configs)),
InferRequestPreprocessDynamicallyInSetBlobTest::getTestCaseName);
} // namespace } // namespace
#endif // ENABLE_GAPI_PREPROCESSING

View File

@ -3,42 +3,26 @@
// //
#include "functional_test_utils/skip_tests_config.hpp" #include "functional_test_utils/skip_tests_config.hpp"
#include "openvino/core/core_visibility.hpp"
#include <string> #include <string>
#include <vector> #include <vector>
#include "openvino/core/core_visibility.hpp"
std::vector<std::string> disabledTestPatterns() { std::vector<std::string> disabledTestPatterns() {
std::vector<std::string> retVector{ std::vector<std::string> retVector{
R"(.*ExclusiveAsyncRequests.*)",
R"(.*ReusableCPUStreamsExecutor.*)",
R"(.*SplitLayerTest.*numSplits=30.*)",
// CVS-51758
R"(.*InferRequestPreprocessConversionTest.*oLT=(NHWC|NCHW).*)",
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*oPRC=0.*oLT=1.*)",
// Not Implemented // Not Implemented
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution).*)", R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*CheckExecGraphInfoBeforeExecution.*)",
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*(checkGetExecGraphInfoIsNotNullptr).*)", R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*CheckExecGraphInfoAfterExecution.*)",
R"(.*OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES.*CanGetExecutionDeviceInfo.*)", R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*checkGetExecGraphInfoIsNotNullptr.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*GetMetricNoThrow.*)", R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*SetCorrectProperties.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS.*GetMetricNoThrow.*)", R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*canSetPropertyAndCheckGetProperty.*)",
//
// unsupported metrics // unsupported metrics
R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_UUID|FULL_DEVICE_NAME_with_DEVICE_ID|RANGE_FOR_STREAMS|DEVICE_GOPS|DEVICE_TYPE|MAX_BATCH_SIZE).*)", R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_UUID|FULL_DEVICE_NAME_with_DEVICE_ID|RANGE_FOR_STREAMS|DEVICE_GOPS|DEVICE_TYPE|MAX_BATCH_SIZE).*)",
// TODO: Round with f16 is not supported // CVS-55937
R"(.*smoke_Hetero_BehaviorTests.*OVExecGraphImportExportTest.*readFromV10IR.*)", R"(.*SplitLayerTest.*numSplits=30.*)",
// TODO: support import / export of precisions in template plugin
R"(.*smoke_Hetero_BehaviorTests.*OVExecGraphImportExportTest.ieImportExportedFunction.*)",
R"(.*smoke_BehaviorTests.*OVExecGraphImportExportTest.ieImportExportedFunction.*)",
// TODO: Round with f16 is not supported
R"(.*smoke_Hetero_BehaviorTests.*OVExecGraphImportExportTest.*readFromV10IR.*)",
R"(.*importExportedIENetworkParameterResultOnly.*elementType=(i8|u8).*)",
R"(.*importExportedIENetworkParameterResultOnly.*elementType=(i16|u16).*)",
R"(.*importExportedIENetworkParameterResultOnly.*elementType=(i64|u64).*)",
R"(.*importExportedIENetworkParameterResultOnly.*elementType=u32.*)",
R"(.*importExportedIENetworkConstantResultOnly.*elementType=(u32|u64).*)",
// CVS-64094 // CVS-64094
R"(.*ReferenceLogSoftmaxLayerTest.*4.*iType=f16.*axis=.*1.*)", R"(.*ReferenceLogSoftmaxLayerTest.*4.*iType=f16.*axis=.*1.*)",
@ -107,8 +91,7 @@ std::vector<std::string> disabledTestPatterns() {
// CVS-71891 // CVS-71891
R"(.*ReferenceTileTest.*rType=i4.*)", R"(.*ReferenceTileTest.*rType=i4.*)",
R"(.*ReferenceTileTest.*rType=u4.*)", R"(.*ReferenceTileTest.*rType=u4.*)",
// CVS-95608
R"(.*CachingSupportCase.*CompileModelCacheTestBase.*)",
// New plugin API doesn't support legacy NV12 I420 preprocessing // New plugin API doesn't support legacy NV12 I420 preprocessing
R"(.*ConvertNV12WithLegacyTest.*)", R"(.*ConvertNV12WithLegacyTest.*)",
R"(.*ConvertI420WithLegacyTest.*)", R"(.*ConvertI420WithLegacyTest.*)",
@ -145,7 +128,8 @@ std::vector<std::string> disabledTestPatterns() {
retVector.emplace_back(R"(.*smoke_TopK_With_Hardcoded_Refs/ReferenceTopKTestMaxMinSortV3.CompareWithRefs.*)"); retVector.emplace_back(R"(.*smoke_TopK_With_Hardcoded_Refs/ReferenceTopKTestMaxMinSortV3.CompareWithRefs.*)");
retVector.emplace_back(R"(.*smoke_TopK_With_Hardcoded_Refs/ReferenceTopKTestBackendV3.CompareWithRefs.*)"); retVector.emplace_back(R"(.*smoke_TopK_With_Hardcoded_Refs/ReferenceTopKTestBackendV3.CompareWithRefs.*)");
// fails only on Linux arm64 // fails only on Linux arm64
retVector.emplace_back(R"(.*ReferenceConversionLayerTest.CompareWithHardcodedRefs/conversionType=(Convert|ConvertLike)_shape=.*_iType=(f16|f32|bf16)_oType=u4.*)"); retVector.emplace_back(
R"(.*ReferenceConversionLayerTest.CompareWithHardcodedRefs/conversionType=(Convert|ConvertLike)_shape=.*_iType=(f16|f32|bf16)_oType=u4.*)");
#endif #endif
return retVector; return retVector;
} }