irischang710 opened a new issue, #17303: URL: https://github.com/apache/tvm/issues/17303
Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :smile_cat: Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed. ### Expected behavior I followed the User Tutorial **Compiling and Optimizing a Model with TVMC** https://tvm.apache.org/docs/tutorial/tvmc_command_line_driver.html and was able to get to **Compiling an ONNX Model to the TVM Runtime** (though the result didn't look right), but failed at **Running the Model from The Compiled Module with TVMC** with the following error: File "/Users/iris/projects/mlc_workspace/tvm/src/runtime/dso_library.cc", line 125 InternalError: Check failed: (lib_handle_ != nullptr) is false: Failed to load dynamic shared library /private/var/folders/y6/fc5zw1js53q0pmq6th2wxt0xrsshqz/T/tmpmy99t2ig/mod.so dlopen(/private/var/folders/y6/fc5zw1js53q0pmq6th2wxt0xrsshqz/T/tmpmy99t2ig/mod.so, 0x0005): tried: '/private/var/folders/y6/fc5zw1js53q0pmq6th2wxt0xrsshqz/T/tmpmy99t2ig/mod.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/y6/fc5zw1js53q0pmq6th2wxt0xrsshqz/T/tmpmy99t2ig/mod.so' (no such file), '/private/var/folders/y6/fc5zw1js53q0pmq6th2wxt0xrsshqz/T/tmpmy99t2ig/mod.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) ### Actual behavior It seems that the architecture is incompatible? (mlc-env) iris@MacBook-Air-3 mlc_workspace % lipo model/mod.so -archs x86_64 I have libtvm and libtvm_runtime under build/ directory and so my TVM build should be successful? and the architecture looks right: (mlc-env) iris@MacBook-Air-3 build % lipo libtvm.dylib -archs arm64 (mlc-env) iris@MacBook-Air-3 build % lipo libtvm_runtime.dylib -archs arm64 ### Environment I built TVM on M2 Mac ### Steps to reproduce python -m tvm.driver.tvmc compile --target "llvm" --target-llvm-mtriple=aarch64-linux-gnu --input-shapes "data:[1,3,224,224]" --output resnet50-v2-7-tvm.tar resnet50-v2-7.onnx python -m tvm.driver.tvmc run --inputs imagenet_cat.npz --output predictions.npz resnet50-v2-7-tvm.tar ### Triage Please refer to the list of label tags [here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the relevant tags and add them below in a bullet format (example below). * needs-triage -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org