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.
- `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.
- `exclusive_async_requests` - allows to use exclusive task executor for asynchronous infer requests.
### Plugin Constructor

View File

@ -10,7 +10,7 @@
#pragma once
#include "ie_plugin_config.hpp"
#include "openvino/runtime/properties.hpp"
#include "openvino/runtime/internal_properties.hpp"
namespace InferenceEngine {
@ -120,14 +120,3 @@ DECLARE_CONFIG_VALUE(DISABLE);
} // namespace PluginConfigInternalParams
} // 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
* @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
* @brief A set of base and helper classes to implement a syncrhonous inference request class.
*

View File

@ -110,4 +110,4 @@ ov::AnyMap PluginConfig::get_full_properties() {
return full_properties;
}
} // namespace MultiDevicePlugin
} // namespace MultiDevicePlugin

View File

@ -16,8 +16,6 @@
#include "perf_counter.hpp"
#include "tensor_conversion_util.hpp"
NGRAPH_SUPPRESS_DEPRECATED_START
namespace {
class DynamicTensor : public ngraph::runtime::HostTensor {
@ -47,7 +45,6 @@ protected:
};
inline ngraph::HostTensorPtr make_tmp_host_tensor(const ov::Tensor& t) {
OPENVINO_SUPPRESS_DEPRECATED_START
if (!t) {
return std::make_shared<DynamicTensor>(ov::element::dynamic);
} 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 {
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) {
ngraph::HostTensorVector result;
@ -126,10 +122,7 @@ bool ov::runtime::interpreter::INTExecutable::call(std::vector<ov::Tensor>& outp
auto variable = var_extension->get_variable();
if (!variable_context.get_variable_value(variable)) {
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());
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));
variable_context.set_variable_value(variable, std::make_shared<ov::op::util::VariableValue>(h_tensor));
}
}
}

View File

@ -7,6 +7,7 @@
#include <cpp_interfaces/interface/ie_internal_plugin_config.hpp>
#include <ie_plugin_config.hpp>
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/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) {
disable_transformations = value.as<bool>();
} else if (ov::exclusive_async_requests == key) {
exclusive_async_requests = value.as<bool>();
} else if (streamExecutorConfigKeys.end() !=
std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), key)) {
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>());
OPENVINO_ASSERT(device_id <= 0, "Device ID ", device_id, " is not supported");
} else if (CONFIG_KEY(PERF_COUNT) == key) {
perf_count = (CONFIG_VALUE(YES) == value.as<std::string>());
} else if (ov::enable_profiling == key) {
perf_count = value.as<bool>();
} else if (ov::hint::performance_mode == key) {
std::stringstream strm{value.as<std::string>()};
strm >> performance_mode;
@ -48,10 +51,12 @@ ov::Any Configuration::Get(const std::string& name) const {
if ((streamExecutorConfigKeys.end() !=
std::find(std::begin(streamExecutorConfigKeys), std::end(streamExecutorConfigKeys), 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)};
} else if (name == CONFIG_KEY(PERF_COUNT)) {
} else if (name == ov::enable_profiling) {
return {perf_count};
} else if (name == ov::exclusive_async_requests) {
return {exclusive_async_requests};
} else if (name == ov::template_plugin::disable_transformations) {
return {disable_transformations};
} else if (name == ov::num_streams) {

View File

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

View File

@ -6,11 +6,11 @@
#include <memory>
#include "cpp_interfaces/interface/ie_internal_plugin_config.hpp"
#include "cpp_interfaces/interface/ie_iplugin_internal.hpp"
#include "ie_plugin_config.hpp"
#include "itt.hpp"
#include "openvino/pass/manager.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp"
#include "remote_context.hpp"
#include "template/properties.hpp"
@ -23,6 +23,7 @@
namespace {
static constexpr const char* wait_executor_name = "TemplateWaitExecutor";
static constexpr const char* stream_executor_name = "TemplateStreamsExecutor";
static constexpr const char* template_exclusive_executor = "TemplateExecutor";
} // namespace
// ! [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
get_executor_manager()->clear(stream_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]
@ -106,12 +105,14 @@ std::shared_ptr<ov::ICompiledModel> ov::template_plugin::Plugin::compile_model(
auto streamsExecutorConfig =
ov::threading::IStreamsExecutor::Config::make_default_multi_threaded(fullConfig.streams_executor_config);
streamsExecutorConfig._name = stream_executor_name;
auto compiled_model =
std::make_shared<CompiledModel>(model->clone(),
shared_from_this(),
context,
get_executor_manager()->get_idle_cpu_streams_executor(streamsExecutorConfig),
fullConfig);
auto compiled_model = std::make_shared<CompiledModel>(
model->clone(),
shared_from_this(),
context,
fullConfig.exclusive_async_requests
? get_executor_manager()->get_executor(template_exclusive_executor)
: get_executor_manager()->get_idle_cpu_streams_executor(streamsExecutorConfig),
fullConfig);
return compiled_model;
}
// ! [plugin:compile_model_with_remote]
@ -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,
ov::enable_profiling,
ov::hint::performance_mode,
ov::exclusive_async_requests,
ov::template_plugin::disable_transformations};
return rw_properties;
};

View File

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

View File

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

View File

@ -4,8 +4,6 @@
#include "behavior/plugin/set_preprocess.hpp"
#ifdef ENABLE_GAPI_PREPROCESSING
using namespace BehaviorTestsDefinitions;
namespace {
@ -55,12 +53,10 @@ const std::vector<InferenceEngine::Precision> ioPrecisions = {
};
const std::vector<InferenceEngine::Layout> netLayouts = {
InferenceEngine::Layout::NCHW,
// InferenceEngine::Layout::NHWC
};
const std::vector<InferenceEngine::Layout> ioLayouts = {
InferenceEngine::Layout::NCHW,
InferenceEngine::Layout::NHWC
};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessConversionTest,
@ -77,20 +73,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessConversionTe
::testing::ValuesIn(configs)),
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
#endif // ENABLE_GAPI_PREPROCESSING

View File

@ -3,42 +3,26 @@
//
#include "functional_test_utils/skip_tests_config.hpp"
#include "openvino/core/core_visibility.hpp"
#include <string>
#include <vector>
#include "openvino/core/core_visibility.hpp"
std::vector<std::string> disabledTestPatterns() {
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
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*(CheckExecGraphInfoBeforeExecution|CheckExecGraphInfoAfterExecution).*)",
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*(checkGetExecGraphInfoIsNotNullptr).*)",
R"(.*OVClassExecutableNetworkGetMetricTest_EXEC_DEVICES.*CanGetExecutionDeviceInfo.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*GetMetricNoThrow.*)",
R"(.*OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS.*GetMetricNoThrow.*)",
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*CheckExecGraphInfoBeforeExecution.*)",
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*CheckExecGraphInfoAfterExecution.*)",
R"(.*(Multi|Auto|Hetero).*Behavior.*OVCompiledModelBaseTest.*checkGetExecGraphInfoIsNotNullptr.*)",
R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*SetCorrectProperties.*)",
R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*canSetPropertyAndCheckGetProperty.*)",
//
// unsupported metrics
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
R"(.*smoke_Hetero_BehaviorTests.*OVExecGraphImportExportTest.*readFromV10IR.*)",
// 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-55937
R"(.*SplitLayerTest.*numSplits=30.*)",
// CVS-64094
R"(.*ReferenceLogSoftmaxLayerTest.*4.*iType=f16.*axis=.*1.*)",
@ -107,8 +91,7 @@ std::vector<std::string> disabledTestPatterns() {
// CVS-71891
R"(.*ReferenceTileTest.*rType=i4.*)",
R"(.*ReferenceTileTest.*rType=u4.*)",
// CVS-95608
R"(.*CachingSupportCase.*CompileModelCacheTestBase.*)",
// New plugin API doesn't support legacy NV12 I420 preprocessing
R"(.*ConvertNV12WithLegacyTest.*)",
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/ReferenceTopKTestBackendV3.CompareWithRefs.*)");
// 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
return retVector;
}