daquexian / onnx-simplifier

Simplify your onnx model
Apache License 2.0
3.83k stars 383 forks source link

Not for Apple M1? #196

Open 54WC opened 2 years ago

54WC commented 2 years ago

Got following error when run on Apple M1( for both arch -arm64 and arch -x86_64 mode).

<ImportError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/pi/lib/python3.8/site-packages/onnxsim/onnxsim_cpp2py_export.cpython-38-darwin.so, 0x0002): tried: '/opt/homebrew/Caskroom/miniforge/base/envs/pi/lib/python3.8/site-packages/onnxsim/onnxsim_cpp2py_export.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))>

daquexian commented 2 years ago

Thanks for your report. I have built M1 wheel by cibuildwheel. Maybe it is somehow broken. I'll check it soon.

However, since onnxsim depends on onnxruntime, I'm afraid you cannot use onnxsim until onnxruntime publishes its M1 wheel, too (maybe in a near future)

daquexian commented 2 years ago

Could you please try the web version for now?

daquexian commented 2 years ago

Thanks for your report! I have published v0.4.2 which fixes its issue. Please try again, thanks!