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

remove log spam from cpuinfo #23548

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

remove log spam from cpuinfo #23548

wants to merge 5 commits into from

Conversation

jywu-msft
Copy link
Member

cpuinfo outputs error when cpu is not recognized.
this has been a longstanding issue e.g.
#21947
#21393

this issue has been exacerbated by #22856
this change

if (MLAS_CPUIDINFO::GetCPUIDInfo().HasArmNeonDot()) {
causes the messages to appear during static initialization.

this means for python, when you import onnxruntime you immediately see the errors.

>>> import onnxruntime
Error in cpuinfo: Unknown chip model name 'snapdragon (tm) 8cx gen 3 @ 3.40 GHz'.
Please add new Windows on Arm SoC/chip support to arm/windows/init.c!
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored
unknown Qualcomm CPU part 0x1 ignored

Fix is to patch pytorch_cpuinfo and to comment out std::cerr lines in cpuid_uarch.cc
the errors are not actionable by the user, so they should not be emitted.

tested that after these changes, these errors no longer show up.

@jywu-msft jywu-msft requested review from snnn and HectorSVC January 31, 2025 01:40
snnn
snnn previously approved these changes Jan 31, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
onnxruntime/core/common/cpuid_uarch.cc Outdated Show resolved Hide resolved
@snnn snnn dismissed their stale review January 31, 2025 01:47

Patch failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants