[PyOV] Cherry-picked convert ExecutionMode enum to any (#23296)

This commit is contained in:
Anastasia Kuporosova 2024-03-07 08:02:31 +01:00 committed by GitHub
parent 004a6e9cf2
commit c4034018fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -363,6 +363,8 @@ ov::Any py_object_to_any(const py::object& py_obj) {
return py::cast<ov::intel_auto::SchedulePolicy>(py_obj);
} else if (py::isinstance<ov::hint::SchedulingCoreType>(py_obj)) {
return py::cast<ov::hint::SchedulingCoreType>(py_obj);
} else if (py::isinstance<ov::hint::ExecutionMode>(py_obj)) {
return py::cast<ov::hint::ExecutionMode>(py_obj);
} else if (py::isinstance<ov::log::Level>(py_obj)) {
return py::cast<ov::log::Level>(py_obj);
} else if (py::isinstance<ov::device::Type>(py_obj)) {

View File

@ -112,6 +112,7 @@ def get_model_path(request, tmp_path):
@pytest.mark.parametrize("config", [
None,
{hints.performance_mode(): hints.PerformanceMode.THROUGHPUT},
{hints.execution_mode: hints.ExecutionMode.PERFORMANCE},
])
def test_compact_api(model_type, device_name, config, request):
compiled_model = None