Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API][AUTO] Fail to get PERF_COUNT from compiled_model #23123

Merged
merged 21 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/plugins/auto/src/auto_compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []() {
Expand All @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/auto/src/cumulative_compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
peterchen-intel marked this conversation as resolved.
Show resolved Hide resolved
return ro_properties;
};
const auto& default_rw_properties = []() {
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_OVClassCompiledModelGetPropertyTest,
OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
::testing::Combine(::testing::Values("AUTO:TEMPLATE"),
::testing::ValuesIn(multiModelPriorityConfigs)));

const std::vector<ov::AnyMap> default_properties = {
{ov::enable_profiling(false)},
};

INSTANTIATE_TEST_SUITE_P(smoke_Auto_Profiling_test,
OVClassCompiledModelPropertiesDefaultTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
::testing::ValuesIn(default_properties)),
OVClassCompiledModelPropertiesDefaultTests::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading