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

[ARM][CPU] Unit test and onnx_runtime_perf test gives cpuinfo error for new Windows ARM chips #21393

Open
mrsabhar opened this issue Jul 17, 2024 · 3 comments
Labels
contributions welcome external contributions welcome platform:windows issues related to the Windows platform

Comments

@mrsabhar
Copy link

Describe the issue

Compiling with unit test enabled or running simile resnet50 through onnxruntime_perf_test gives cpuinfo error.

Error in cpuinfo: Unknown chip model name 'Snapdragon(R) X Elite - X1E78100 - Qualcomm(R) Oryon(TM) CPU'.

To reproduce

Compile latest onnxruntime (main branch) with below command line
image

or using default command (CPU only) with arm64 option.

Don't see this issue when running through win-x64 binaries on ARM64.

Several unit test fails with error
image

This issue also happens with prebuild package - https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.QNN

Running onnxruntime_perf_test on Asus X Elite targeted for CPU -

image

Urgency

No response

Platform

Windows

OS Version

Windows 11 Home 10.0.26100

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

80b56fe

ONNX Runtime API

C++

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Jul 17, 2024
@snnn snnn added ep:QNN issues related to QNN exeution provider and removed ep:QNN issues related to QNN exeution provider labels Jul 18, 2024
@snnn
Copy link
Member

snnn commented Jul 18, 2024

As the message says, the following file needs to be updated to include this new CPU support:

https://github.com/pytorch/cpuinfo/blob/main/src/arm/windows/init.c

@snnn
Copy link
Member

snnn commented Jul 18, 2024

Would you mind submitting an issue to https://github.com/pytorch/cpuinfo ?

@snnn snnn added the contributions welcome external contributions welcome label Jul 18, 2024
@ashumish-QCOM
Copy link

Hi @mrsabhar

Could you please confirm if this issue is still being encountered?

Did you try updating https://github.com/pytorch/cpuinfo/blob/main/src/arm/windows/init.c

Thank you.

jywu-msft added a commit that referenced this issue Feb 1, 2025
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
https://github.com/microsoft/onnxruntime/blob/4fa0f1e0edb43141c68302859e410f2ec1232c3a/onnxruntime/core/mlas/lib/qnbitgemm_kernel_neon.cpp#L189
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.
sfatimar pushed a commit to intel/onnxruntime that referenced this issue Feb 5, 2025
cpuinfo outputs error when cpu is not recognized. 
this has been a longstanding issue e.g. 
microsoft#21947
microsoft#21393

this issue has been exacerbated by
microsoft#22856
this change
https://github.com/microsoft/onnxruntime/blob/4fa0f1e0edb43141c68302859e410f2ec1232c3a/onnxruntime/core/mlas/lib/qnbitgemm_kernel_neon.cpp#L189
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.
sfatimar pushed a commit to intel/onnxruntime that referenced this issue Feb 5, 2025
cpuinfo outputs error when cpu is not recognized. 
this has been a longstanding issue e.g. 
microsoft#21947
microsoft#21393

this issue has been exacerbated by
microsoft#22856
this change
https://github.com/microsoft/onnxruntime/blob/4fa0f1e0edb43141c68302859e410f2ec1232c3a/onnxruntime/core/mlas/lib/qnbitgemm_kernel_neon.cpp#L189
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.
ashrit-ms pushed a commit that referenced this issue Feb 11, 2025
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
https://github.com/microsoft/onnxruntime/blob/4fa0f1e0edb43141c68302859e410f2ec1232c3a/onnxruntime/core/mlas/lib/qnbitgemm_kernel_neon.cpp#L189
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome external contributions welcome platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

3 participants