[API][AUTO] Fail to get PERF_COUNT from compiled_model (#23123)
### Details: - *Fail to get PERF_COUNT from compiled_model* ### Tickets: - *CVS-130349*
This commit is contained in:
parent
964e9e81b3
commit
d5b81f1c80
|
|
@ -47,7 +47,8 @@ ov::Any AutoCompiledModel::get_property(const std::string& name) const {
|
|||
ov::device::priorities,
|
||||
ov::device::properties,
|
||||
ov::hint::model_priority,
|
||||
ov::loaded_from_cache};
|
||||
ov::loaded_from_cache,
|
||||
ov::enable_profiling};
|
||||
return ro_properties;
|
||||
};
|
||||
const auto& default_rw_properties = []() {
|
||||
|
|
@ -63,6 +64,8 @@ ov::Any AutoCompiledModel::get_property(const std::string& name) const {
|
|||
supported_properties.insert(supported_properties.end(), ro_properties.begin(), ro_properties.end());
|
||||
supported_properties.insert(supported_properties.end(), rw_properties.begin(), rw_properties.end());
|
||||
return decltype(ov::supported_properties)::value_type(supported_properties);
|
||||
} else if (name == ov::enable_profiling) {
|
||||
return m_context->m_need_perf_counters;
|
||||
} else if (name == ov::hint::performance_mode) {
|
||||
return m_context->m_performance_hint;
|
||||
} else if (name == ov::device::priorities) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ ov::Any AutoCumuCompiledModel::get_property(const std::string& name) const {
|
|||
ov::device::properties,
|
||||
ov::hint::model_priority,
|
||||
ov::loaded_from_cache,
|
||||
ov::intel_auto::schedule_policy};
|
||||
ov::intel_auto::schedule_policy,
|
||||
ov::enable_profiling};
|
||||
return ro_properties;
|
||||
};
|
||||
const auto& default_rw_properties = []() {
|
||||
|
|
@ -63,6 +64,8 @@ ov::Any AutoCumuCompiledModel::get_property(const std::string& name) const {
|
|||
supported_properties.insert(supported_properties.end(), ro_properties.begin(), ro_properties.end());
|
||||
supported_properties.insert(supported_properties.end(), rw_properties.begin(), rw_properties.end());
|
||||
return decltype(ov::supported_properties)::value_type(supported_properties);
|
||||
} else if (name == ov::enable_profiling) {
|
||||
return m_context->m_need_perf_counters;
|
||||
} else if (name == ov::hint::performance_mode) {
|
||||
return m_context->m_performance_hint;
|
||||
} else if (name == ov::intel_auto::schedule_policy) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "behavior/compiled_model/properties.hpp"
|
||||
|
||||
#include "openvino/runtime/auto/properties.hpp"
|
||||
#include "openvino/runtime/properties.hpp"
|
||||
#include "openvino/runtime/system_conf.hpp"
|
||||
|
||||
|
|
@ -138,4 +139,24 @@ INSTANTIATE_TEST_SUITE_P(smoke_OVClassCompiledModelGetPropertyTest,
|
|||
OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
|
||||
::testing::Combine(::testing::Values("AUTO:TEMPLATE"),
|
||||
::testing::ValuesIn(multiModelPriorityConfigs)));
|
||||
|
||||
const std::vector<ov::AnyMap> auto_default_properties = {
|
||||
{ov::enable_profiling(false)},
|
||||
{ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
|
||||
{ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_Default_test,
|
||||
OVClassCompiledModelPropertiesDefaultTests,
|
||||
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(auto_default_properties)),
|
||||
OVClassCompiledModelPropertiesDefaultTests::getTestCaseName);
|
||||
|
||||
const std::vector<ov::AnyMap> multi_default_properties = {{ov::enable_profiling(false)}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_Default_test,
|
||||
OVClassCompiledModelPropertiesDefaultTests,
|
||||
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
|
||||
::testing::ValuesIn(multi_default_properties)),
|
||||
OVClassCompiledModelPropertiesDefaultTests::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ const std::vector<ov::AnyMap> multi_Auto_properties = {
|
|||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::intel_auto::device_bind_buffer("NO")},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::intel_auto::enable_startup_fallback("YES")},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::intel_auto::enable_startup_fallback("NO")},
|
||||
};
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(true)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(false)}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiBehaviorTests,
|
||||
OVPropertiesTests,
|
||||
|
|
@ -41,7 +42,9 @@ const std::vector<ov::AnyMap> multi_setcore_properties = {
|
|||
const std::vector<ov::AnyMap> multi_compileModel_properties = {
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE),
|
||||
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT),
|
||||
ov::hint::model_priority(ov::hint::Priority::MEDIUM)}};
|
||||
ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(true)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(false)}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_MultiCompileModelBehaviorTests,
|
||||
OVSetPropComplieModleGetPropTests,
|
||||
|
|
@ -70,7 +73,9 @@ const std::vector<ov::AnyMap> auto_compileModel_properties = {
|
|||
ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE),
|
||||
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT),
|
||||
ov::hint::model_priority(ov::hint::Priority::MEDIUM)}};
|
||||
ov::hint::model_priority(ov::hint::Priority::MEDIUM)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(true)},
|
||||
{ov::device::priorities(ov::test::utils::DEVICE_TEMPLATE), ov::enable_profiling(false)}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_AutoCompileModelBehaviorTests,
|
||||
OVSetPropComplieModleGetPropTests,
|
||||
|
|
|
|||
Loading…
Reference in New Issue