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

incompatible architecture v1.14.0 #14663

Closed
babenek opened this issue Feb 11, 2023 · 8 comments · Fixed by #14682
Closed

incompatible architecture v1.14.0 #14663

babenek opened this issue Feb 11, 2023 · 8 comments · Fixed by #14682
Assignees
Labels
regression issues that demonstrate a regression in ORT functionality and need to be addressed immediately

Comments

@babenek
Copy link

babenek commented Feb 11, 2023

Describe the issue

Specific configuration (latest) fails with the version.
Python 3.9.16 pip 23 onnxruntime 1.14.0

https://github.com/babenek/CredSweeper/actions/runs/4149456697/jobs/7178418969

ImportError:
dlopen(/Users/runner/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so, 0x0002): tried: '/Users/runner/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so' 
(mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))

To reproduce

GitHub workflow for macos with Python 3.9.16 and import onnxruntime 1.14.0

Urgency

Not urgent. Prrevious version will be used.

Platform

Mac

OS Version

macos 12.6.3 21G419

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

v1.14.0

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Other / Unknown

Execution Provider Library Version

No response

@davidmezzetti
Copy link

davidmezzetti commented Feb 11, 2023

Same. You know what they say about Friday releases.

https://github.com/neuml/txtai/actions/runs/4148508839/jobs/7178595222

@fxmarty
Copy link
Contributor

fxmarty commented Feb 13, 2023

We hit the same issue, see for example: https://github.com/huggingface/optimum/actions/runs/4163709490/jobs/7204436534

@jcwchen
Copy link
Contributor

jcwchen commented Feb 13, 2023

ONNX pipeline hits the same issue while using ORT 1.14 Python 3.9 wheel on Mac. See the log here: https://github.com/onnx/onnx/actions/runs/4147821575/jobs/7208166327.

@jcwchen jcwchen added regression issues that demonstrate a regression in ORT functionality and need to be addressed immediately release:1.14 labels Feb 13, 2023
@faxu
Copy link
Contributor

faxu commented Feb 13, 2023

Thanks for posting the issue. We are investigating..

mike0sv added a commit to iterative/mlem that referenced this issue Feb 14, 2023
mike0sv added a commit to iterative/mlem that referenced this issue Feb 14, 2023
jvesely added a commit to jvesely/PsyNeuLink that referenced this issue Feb 15, 2023
Add onnxruntime-1.14.0 on macos to the constraint.
microsoft/onnxruntime#14663

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
jvesely added a commit to jvesely/PsyNeuLink that referenced this issue Feb 15, 2023
Add onnxruntime-1.14.0 on macos to the constraint.
microsoft/onnxruntime#14663

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
jvesely added a commit to jvesely/PsyNeuLink that referenced this issue Feb 15, 2023
Add onnxruntime-1.14.0 on macos to the constraint.
microsoft/onnxruntime#14663

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
jvesely added a commit to jvesely/PsyNeuLink that referenced this issue Feb 16, 2023
Add onnxruntime-1.14.0 on macos to the constraint.
microsoft/onnxruntime#14663

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
@jchen351 jchen351 linked a pull request Feb 16, 2023 that will close this issue
@jchen351 jchen351 self-assigned this Feb 16, 2023
@jchen351
Copy link
Contributor

jchen351 commented Feb 16, 2023

Updated python packages will be released along with v-1.14.1

jvesely added a commit to PrincetonUniversity/PsyNeuLink that referenced this issue Feb 16, 2023
Add onnxruntime-1.14.0 on macos to the constraint.
microsoft/onnxruntime#14663

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
@jcwchen
Copy link
Contributor

jcwchen commented Feb 28, 2023

I can confirm the fresh ORT patch 1.14.1 doesn't have such an issue anymore in ONNX pipelines: onnx/onnx#4950. Thanks @jchen351 for fixing this.

@babenek
Copy link
Author

babenek commented Feb 28, 2023

Confirm, The issue was fixed.
Thanks @jchen351, @davidmezzetti, @faxu, @fxmarty, @jcwchen for the support!

justinchuby added a commit to microsoft/onnxscript that referenced this issue Mar 8, 2023
I saw an error comes from certain Python 3.9 CI pipeline:
`'/Users/runner/work/onnx-script/onnx-script/.nox/test/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so'
(mach-o file, but is an incompatible architecture (have (arm64), need
(x86_64)))`, which is fixed by the latest ONNX Runtime 1.14.1:
microsoft/onnxruntime#14663. Bumping
onnxruntime version here should help. Meanwhile, also try to bump onnx
and torch to the latest patch release, which should be harmless.

---------

Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
@varunsha30
Copy link

varunsha30 commented Jul 29, 2023

Hello, I am facing the same issue. I have installed onnxruntime using pip to my virtual environment. When I import onnxruntime using import onnxruntime it throws the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[31], line 1
----> 1 import onnxruntime

File [~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/__init__.py:55](https://file+.vscode-resource.vscode-cdn.net/Users/varunsharma/Downloads/Projects/LLM/~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/__init__.py:55)
     52 from onnxruntime.capi import onnxruntime_validation
     54 if import_capi_exception:
---> 55     raise import_capi_exception
     57 from onnxruntime.capi.onnxruntime_inference_collection import InferenceSession  # noqa: F401
     58 from onnxruntime.capi.onnxruntime_inference_collection import IOBinding  # noqa: F401

File [~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/__init__.py:23](https://file+.vscode-resource.vscode-cdn.net/Users/varunsharma/Downloads/Projects/LLM/~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/__init__.py:23)
     13 # we need to do device version validation (for example to check Cuda version for an onnxruntime-training package).
     14 # in order to know whether the onnxruntime package is for training it needs
     15 # to do import onnxruntime.training.ortmodule first.
   (...)
     20 # meaningful messages to the user.
     21 # the saved exception is raised after device version validation.
     22 try:
---> 23     from onnxruntime.capi._pybind_state import ExecutionMode  # noqa: F401
     24     from onnxruntime.capi._pybind_state import ExecutionOrder  # noqa: F401
     25     from onnxruntime.capi._pybind_state import GraphOptimizationLevel  # noqa: F401

File [~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/_pybind_state.py:33](https://file+.vscode-resource.vscode-cdn.net/Users/varunsharma/Downloads/Projects/LLM/~/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/_pybind_state.py:33)
     25         if not os.path.isfile(os.path.join(system_root, "System32", "vcruntime140_1.dll")):
     26             warnings.warn("Please install the 2019 Visual C++ runtime and then try again. "
     27                           "If you've installed the runtime in a non-standard location "
     28                           "(other than %SystemRoot%\System32), "
     29                           "make sure it can be found by setting the correct path.")
---> 33 from .onnxruntime_pybind11_state import *  # noqa

ImportError: dlopen(/Users/varunsharma/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so, 0x0002): tried: '/Users/varunsharma/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/varunsharma/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so' (no such file), '/Users/varunsharma/Downloads/Projects/LLM/llm/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I am using m2 air with macos 14.0 (Sonoma beta version).
Here is some information about the onnxruntime installed:

Name: onnxruntime
Version: 1.15.1
Summary: ONNX Runtime is a runtime accelerator for Machine Learning models
Home-page: https://onnxruntime.ai
Author: Microsoft Corporation
Author-email: onnxruntime@microsoft.com
License: MIT License
Location: /Users/varunsharma/Downloads/Projects/LLM/llm/lib/python3.11/site-packages
Requires: coloredlogs, flatbuffers, numpy, packaging, protobuf, sympy
Required-by: chromadb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression issues that demonstrate a regression in ORT functionality and need to be addressed immediately
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants