Skip to content

Comments

[web] remove the unhelpful "Unknown CPU vendor" warning.#27399

Open
fs-eire wants to merge 1 commit intomainfrom
fs-eire/wasm-fix-warning-cpuinfo
Open

[web] remove the unhelpful "Unknown CPU vendor" warning.#27399
fs-eire wants to merge 1 commit intomainfrom
fs-eire/wasm-fix-warning-cpuinfo

Conversation

@fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Feb 20, 2026

Description

remove the "Unknown CPU vendor" warning for webassembly.

CPU info is not supposed to expose in a browser environment, so it is expected to have no CPU info at runtime. Disable the confusing warning message for WebAssembly.

Motivation and Context

fixes #27336

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the confusing "Unknown CPU vendor" warning for WebAssembly builds where CPU information is intentionally not exposed in browser environments.

Changes:

  • Skip VendorInfoInit() call on WebAssembly platforms to avoid the warning
  • Initialize vendor_id_ to 0 to ensure proper default value when VendorInfoInit is not called

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
onnxruntime/core/common/cpuid_info.h Add explicit initialization of vendor_id_ to 0 to ensure defined behavior on WebAssembly
onnxruntime/core/common/cpuid_info.cc Conditionally skip VendorInfoInit() on wasm builds to prevent warning about unknown CPU vendor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Web] 2026-02-13 15:07:59.742264 [W:onnxruntime:Default, cpuid_info.cc:95 LogEarlyWarning] Unknown CPU vendor. cpuinfo_vendor value: 0

1 participant