Remove ov::hint::PerformanceMode::UNDEFINED (#21592)

* Remove ov::hint::PerformanceMode::UNDEFINED

* Update for reviewer comments and build issue

* Fix build error - may be used uninitialized

* Update

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
River Li
2023-12-21 01:15:26 +08:00
committed by GitHub
parent 3d3bb51de9
commit dc64268564
8 changed files with 35 additions and 60 deletions

View File

@@ -57,7 +57,6 @@ void regmodule_properties(py::module m) {
OPENVINO_SUPPRESS_DEPRECATED_START
py::enum_<ov::hint::PerformanceMode>(m_hint, "PerformanceMode", py::arithmetic())
.value("UNDEFINED", ov::hint::PerformanceMode::UNDEFINED)
.value("LATENCY", ov::hint::PerformanceMode::LATENCY)
.value("THROUGHPUT", ov::hint::PerformanceMode::THROUGHPUT)
.value("CUMULATIVE_THROUGHPUT", ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT);

View File

@@ -37,13 +37,6 @@ def test_properties_rw_base():
assert "incompatible function arguments" in str(e.value)
def test_deprecation():
with pytest.warns(DeprecationWarning) as w:
_ = hints.PerformanceMode.UNDEFINED
assert issubclass(w[0].category, DeprecationWarning)
assert "PerformanceMode.UNDEFINED is deprecated and will be removed" in str(w[0].message)
###
# Enum-like values
###
@@ -71,7 +64,6 @@ def test_deprecation():
(
hints.PerformanceMode,
(
(hints.PerformanceMode.UNDEFINED, "PerformanceMode.UNDEFINED", -1),
(hints.PerformanceMode.LATENCY, "PerformanceMode.LATENCY", 1),
(hints.PerformanceMode.THROUGHPUT, "PerformanceMode.THROUGHPUT", 2),
(hints.PerformanceMode.CUMULATIVE_THROUGHPUT, "PerformanceMode.CUMULATIVE_THROUGHPUT", 3),
@@ -253,7 +245,7 @@ def test_properties_ro(ov_property_ro, expected_value):
(
hints.performance_mode,
"PERFORMANCE_HINT",
((hints.PerformanceMode.UNDEFINED, hints.PerformanceMode.UNDEFINED),),
((hints.PerformanceMode.THROUGHPUT, hints.PerformanceMode.THROUGHPUT),),
),
(
hints.enable_cpu_pinning,