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

Use openvino instead of cpuinfo to get CPU full name #3357

Merged
merged 3 commits into from
Mar 20, 2025
Merged
Changes from 1 commit
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
Next Next commit
Use openvino instead of cpu_info to get CPU full name
nikita-savelyevv committed Mar 19, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8fadd5c29d7d4a5217e66f170f8f8041897b438e
5 changes: 3 additions & 2 deletions nncf/common/utils/cpu_info.py → nncf/openvino/cpu_info.py
Original file line number Diff line number Diff line change
@@ -11,13 +11,14 @@

import re

import cpuinfo # type: ignore
import openvino as ov

_IS_LNL_CPU = None


def is_lnl_cpu() -> bool:
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
2 changes: 1 addition & 1 deletion nncf/openvino/optimized_functions/models.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",