diff --git a/nncf/common/utils/cpu_info.py b/nncf/openvino/cpu_info.py similarity index 67% rename from nncf/common/utils/cpu_info.py rename to nncf/openvino/cpu_info.py index c0f8f1c973e..8f1150dfc15 100644 --- a/nncf/common/utils/cpu_info.py +++ b/nncf/openvino/cpu_info.py @@ -11,13 +11,18 @@ import re -import cpuinfo # type: ignore +import openvino as ov _IS_LNL_CPU = None def is_lnl_cpu() -> bool: + """ + Checks whether current CPU is an Intel Lunar Lake generation or not. + :return: True if current CPU is an Intel Lunar Lake generation, False otherwise. + """ global _IS_LNL_CPU if _IS_LNL_CPU is None: - _IS_LNL_CPU = re.search(r"Ultra \d 2\d{2}", cpuinfo.get_cpu_info()["brand_raw"]) is not None + cpu_name = ov.Core().get_property("CPU", ov.properties.device.full_name) + _IS_LNL_CPU = re.search(r"Ultra \d 2\d{2}", cpu_name) is not None return _IS_LNL_CPU diff --git a/nncf/openvino/optimized_functions/models.py b/nncf/openvino/optimized_functions/models.py index 7e0588117ca..6036dd8a438 100644 --- a/nncf/openvino/optimized_functions/models.py +++ b/nncf/openvino/optimized_functions/models.py @@ -25,8 +25,8 @@ from nncf.common.utils.backend import is_openvino_at_least from nncf.common.utils.caching import ResultsCache from nncf.common.utils.caching import cache_results -from nncf.common.utils.cpu_info import is_lnl_cpu from nncf.common.utils.helpers import set_env_variable +from nncf.openvino.cpu_info import is_lnl_cpu from nncf.openvino.graph.node_utils import convert_op from nncf.openvino.graph.node_utils import non_convertable_divide_op from nncf.quantization.algorithms.weight_compression.config import WeightCompressionConfig diff --git a/pyproject.toml b/pyproject.toml index 38982653a0b..8b5d36238fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,6 @@ dependencies = [ "packaging>=20.0", "pandas>=1.1.5,<2.3", "psutil", - "py-cpuinfo>=9.0.0", "pydot>=1.4.1, <=3.0.4", "pymoo>=0.6.0.1", "rich>=13.5.2",