OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
Add enable_cpu_reservation property in python (#31689)
Sun Xiaoxiab3c74fae04a5
diff --git a/src/bindings/c/src/ov_property.cpp b/src/bindings/c/src/ov_property.cppindex 4d1e3681734..3938f16f173 100644--- a/src/bindings/c/src/ov_property.cpp+++ b/src/bindings/c/src/ov_property.cpp@@ -24,6 +24,7 @@ const char* ov_property_key_num_streams = "NUM_STREAMS";const char* ov_property_key_inference_num_threads = "INFERENCE_NUM_THREADS";const char* ov_property_key_hint_performance_mode = "PERFORMANCE_HINT";const char* ov_property_key_hint_enable_cpu_pinning = "ENABLE_CPU_PINNING";+const char* ov_property_key_hint_enable_cpu_reservation = "ENABLE_CPU_RESERVATION";const char* ov_property_key_hint_scheduling_core_type = "SCHEDULING_CORE_TYPE";const char* ov_property_key_hint_enable_hyper_threading = "ENABLE_HYPER_THREADING";const char* ov_property_key_hint_inference_precision = "INFERENCE_PRECISION_HINT";diff --git a/src/bindings/python/src/openvino/runtime/properties/hint/__init__.py b/src/bindings/python/src/openvino/runtime/properties/hint/__init__.pyindex 2b637640019..952e41d27f9 100644--- a/src/bindings/python/src/openvino/runtime/properties/hint/__init__.py+++ b/src/bindings/python/src/openvino/runtime/properties/hint/__init__.py@@ -14,6 +14,7 @@ from openvino._pyopenvino.properties.hint import inference_precisionfrom openvino._pyopenvino.properties.hint import model_priorityfrom openvino._pyopenvino.properties.hint import performance_modefrom openvino._pyopenvino.properties.hint import enable_cpu_pinning+from openvino._pyopenvino.properties.hint import enable_cpu_reservationfrom openvino._pyopenvino.properties.hint import scheduling_core_typefrom openvino._pyopenvino.properties.hint import model_distribution_policyfrom openvino._pyopenvino.properties.hint import enable_hyper_threadingdiff --git a/src/bindings/python/src/pyopenvino/core/properties/properties.cpp b/src/bindings/python/src/pyopenvino/core/properties/properties.cppindex 4aadb3dec93..168c8d75913 100644--- a/src/bindings/python/src/pyopenvino/core/properties/properties.cpp+++ b/src/bindings/python/src/pyopenvino/core/properties/properties.cpp@@ -90,6 +90,7 @@ void regmodule_properties(py::module m) {wrap_property_RW(m_hint, ov::hint::model_priority, "model_priority");wrap_property_RW(m_hint, ov::hint::performance_mode, "performance_mode");wrap_property_RW(m_hint, ov::hint::enable_cpu_pinning, "enable_cpu_pinning");+ wrap_property_RW(m_hint, ov::hint::enable_cpu_reservation, "enable_cpu_reservation");wrap_property_RW(m_hint, ov::hint::scheduling_core_type, "scheduling_core_type");wrap_property_RW(m_hint, ov::hint::model_distribution_policy, "model_distribution_policy");wrap_property_RW(m_hint, ov::hint::enable_hyper_threading, "enable_hyper_threading");diff --git a/src/bindings/python/tests/test_runtime/test_properties.py b/src/bindings/python/tests/test_runtime/test_properties.pyindex e97779e99d8..83456f4b820 100644--- a/src/bindings/python/tests/test_runtime/test_properties.py+++ b/src/bindings/python/tests/test_runtime/test_properties.py@@ -295,6 +295,16 @@ def test_properties_ro(ov_property_ro, expected_value):(0, False),),),+ (+ hints.enable_cpu_reservation,+ "ENABLE_CPU_RESERVATION",+ (+ (True, True),+ (False, False),+ (1, True),+ (0, False),+ ),+ ),(hints.scheduling_core_type,"SCHEDULING_CORE_TYPE",