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

Schema Error and Incorrect Inference Results with Homebrew-installed ONNX and ONNX Runtime #23408

Closed
eKevinHoang opened this issue Jan 17, 2025 · 2 comments

Comments

@eKevinHoang
Copy link

Describe the issue

When running inference in C++ using ONNX Runtime, I encountered the following error: Schema error: Trying to register schema with name ...

Additionally, the inference results were incorrect, even though the same model worked perfectly on Python with ONNX Runtime.

To reproduce

  1. Install ONNX and ONNX Runtime using Homebrew:
    brew install onnx onnxruntime
  2. Run inference with an ONNX model converted from YOLO.

Urgency

No response

Platform

Mac

OS Version

Sequoia 15.2

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

[email protected], onnxruntime-1.20.1

ONNX Runtime API

C++

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@snnn
Copy link
Member

snnn commented Jan 17, 2025

Duplicated schema? Must because you compiled some ONNX Runtime's dependencies to shared lib(instead of static lib). For example, protobuf. The Homebrew receipt is not maintained by us. Sorry I don't have a Mac. I cannot help much.

@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
@snnn
Copy link
Member

snnn commented Jan 17, 2025

Besides, we build ONNX with cmake option "ONNX_DISABLE_STATIC_REGISTRATION=ON". If you used a prebuilt ONNX library from somewhere else, unlikely it was built in such a way. Then it would cause a conflict when registering schemas.

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

No branches or pull requests

2 participants