Skip to content

Commit

Permalink
[apiConformance] Fix issues in core properties tests (openvinotoolkit…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi authored May 24, 2023
1 parent 13c966f commit be96f54
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,38 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiHeteroOVGetMetricPropsTest,

INSTANTIATE_TEST_SUITE_P(smoke_OVGetMetricPropsTest, OVGetMetricPropsTest, ::testing::Values("CPU"));

INSTANTIATE_TEST_SUITE_P(
smoke_AutoMultiHeteroOVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values("MULTI", "HETERO", "AUTO"),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_OVGetAvailableDevicesPropsTest,
OVGetAvailableDevicesPropsTest,
::testing::Values("CPU"));

INSTANTIATE_TEST_SUITE_P(
OVCheckSetSupportedRWMandatoryMetricsPropsTests,
OVCheckSetSupportedRWMetricsPropsTests,
::testing::Combine(::testing::Values("MULTI", "AUTO"),
::testing::Combine(::testing::Values("MULTI:CPU", "AUTO:CPU"),
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWMandatoryPropertiesValues(
{ov::hint::model_priority.name(), ov::log::level.name()}))),
OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(
OVCheckSetSupportedRWOptionalMetricsPropsTests,
OVCheckSetSupportedRWMetricsPropsTests,
::testing::Combine(::testing::Values("MULTI", "AUTO"),
::testing::Combine(::testing::Values("MULTI:CPU", "AUTO:CPU"),
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues(
{ov::hint::enable_hyper_threading.name(),
ov::hint::enable_cpu_pinning.name(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_Auto_BehaviorTests.*DynamicOutputToDynamicInput.*)",
R"(.*smoke_Auto_BehaviorTests.*DynamicInputToDynamicOutput.*)",
// unsupported metrics
R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_ID|MAX_BATCH_SIZE).*)",
R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*(MAX_BATCH_SIZE).*)",
R"(.*smoke_AutoMultiHeteroOVGetMetricPropsTest.*OVGetMetricPropsTest.*(AVAILABLE_DEVICES|OPTIMIZATION_CAPABILITIES|RANGE_FOR_ASYNC_INFER_REQUESTS|RANGE_FOR_STREAMS).*)",
// supports only '' as device id
R"(.*OVClassQueryModelTest.*QueryModelWithDeviceID.*)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ INSTANTIATE_TEST_SUITE_P(smoke_MultiHeteroOVGetMetricPropsTest,

INSTANTIATE_TEST_SUITE_P(nightly_OVGetMetricPropsTest, OVGetMetricPropsTest, ::testing::Values("GNA"));

INSTANTIATE_TEST_SUITE_P(
smoke_MultiHeteroOVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values("MULTI", "HETERO"),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_GNA),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

const std::vector<std::tuple<std::string, std::pair<ov::AnyMap, std::string>>> GetMetricTest_ExecutionDevice_GNA = {
{"GNA", std::make_pair(ov::AnyMap{}, "GNA")}};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*CachingSupportCase.*LoadNet.*(ConvPoolRelu|TIwithLSTMcell1)_f32_batch2.*)",
R"(.*smoke_Multi_BehaviorTests.*)",
// unsupported metrics
R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*DEVICE_ID.*)",
R"(.*smoke_MultiHeteroOVGetMetricPropsTest.*OVGetMetricPropsTest.*(AVAILABLE_DEVICES|OPTIMIZATION_CAPABILITIES|RANGE_FOR_ASYNC_INFER_REQUESTS|RANGE_FOR_STREAMS).*)",
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ INSTANTIATE_TEST_SUITE_P(nightly_OVGetAvailableDevicesPropsTest,
INSTANTIATE_TEST_SUITE_P(
smoke_MultiAutoOVCheckSetSupportedRWMetricsPropsTests,
OVCheckSetSupportedRWMetricsPropsTests,
::testing::Combine(::testing::Values("MULTI", "AUTO"),
::testing::Combine(::testing::Values("MULTI:GPU", "AUTO:GPU"),
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWMandatoryPropertiesValues(
{ov::hint::model_priority.name(), ov::log::level.name()}))),
OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName);
Expand All @@ -169,9 +169,21 @@ INSTANTIATE_TEST_SUITE_P(
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::uuid.name(), ov::device::gops.name(), ov::device::type.name()}))),
{ov::device::uuid.name(), ov::device::gops.name(), ov::device::type.name(), ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_MultiHeteroAutoBatchOVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
OVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
::testing::Combine(::testing::Values("MULTI", "HETERO", "AUTO", "BATCH"),
::testing::Values(ov::AnyMap({}))),
OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_gpuOVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
OVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
::testing::Combine(::testing::Values("GPU"),
::testing::Values(ov::AnyMap({}))),
OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckSetSupportedRWMetricsPropsTests,
OVCheckSetSupportedRWMetricsPropsTests,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests,
INSTANTIATE_TEST_SUITE_P(smoke_OVGetMetricPropsTest,
OVGetMetricPropsTest,
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE));

INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ov::device::full_name.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

//
// OV Class GetConfig
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*canSetPropertyAndCheckGetProperty.*)",
//
// unsupported metrics
R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_ID|RANGE_FOR_STREAMS|MAX_BATCH_SIZE).*)",
R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(RANGE_FOR_STREAMS|MAX_BATCH_SIZE).*)",

// CVS-55937
R"(.*SplitLayerTest.*numSplits=30.*)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ INSTANTIATE_TEST_SUITE_P(ov_plugin_AutoBatch, OVPropertiesIncorrectTests,
const std::vector<ov::AnyMap> default_properties = {
{},
{ov::enable_profiling(true)},
{ov::device::id("0")},
};

const std::vector<ov::AnyMap> auto_batch_properties = {
Expand Down Expand Up @@ -80,14 +79,10 @@ INSTANTIATE_TEST_SUITE_P(ov_plugin, OVCheckSetSupportedRWMetricsPropsTests,
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues())),
OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName);

const std::vector<ov::AnyMap> device_properties = {
{ov::device::id("0")},
};

INSTANTIATE_TEST_SUITE_P(ov_plugin_mandatory, OVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
::testing::Combine(
::testing::ValuesIn(return_all_possible_device_combination()),
::testing::ValuesIn(device_properties)),
::testing::Values(ov::AnyMap({}))),
OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(ov_plugin, OVCheckMetricsPropsTests_ModelDependceProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class OVSetPropComplieModleGetPropTests : public testing::WithParamInterface<Com
AnyMap compileModelProperties;
};

class OVPropertiesTestsWithComplieModelProps : public testing::WithParamInterface<PropertiesParams>,
class OVPropertiesTestsWithCompileModelProps : public testing::WithParamInterface<PropertiesParams>,
public OVPropertiesBase {
public:
static std::string getTestCaseName(testing::TestParamInfo<PropertiesParams> obj);
Expand All @@ -77,10 +77,10 @@ class OVPropertiesTestsWithComplieModelProps : public testing::WithParamInterfac
static std::vector<ov::AnyMap> getModelDependcePropertiesValues();
};

using OVCheckSetSupportedRWMetricsPropsTests = OVPropertiesTestsWithComplieModelProps;
using OVCheckGetSupportedROMetricsPropsTests = OVPropertiesTestsWithComplieModelProps;
using OVCheckChangePropComplieModleGetPropTests_DEVICE_ID = OVPropertiesTestsWithComplieModelProps;
using OVCheckMetricsPropsTests_ModelDependceProps = OVPropertiesTestsWithComplieModelProps;
using OVCheckSetSupportedRWMetricsPropsTests = OVPropertiesTestsWithCompileModelProps;
using OVCheckGetSupportedROMetricsPropsTests = OVPropertiesTestsWithCompileModelProps;
using OVCheckChangePropComplieModleGetPropTests_DEVICE_ID = OVPropertiesTestsWithCompileModelProps;
using OVCheckMetricsPropsTests_ModelDependceProps = OVPropertiesTestsWithCompileModelProps;

class OVClassSetDefaultDeviceIDPropTest : public OVPluginTestBase,
public ::testing::WithParamInterface<std::pair<std::string, std::string>> {
Expand Down
Loading

0 comments on commit be96f54

Please sign in to comment.