macOS M1平台下编译使用ONNX Runtime
1 | git clone --recursive --depth=1 --branch v1.18.0 https://github.com/microsoft/onnxruntime.git |
Please note that these instructions build the debug build, which may have performance tradeoffs. The “–config” parameter has four valid values: Debug, Release, RelWithDebInfo and MinSizeRel. Compared to “Release”, “RelWithDebInfo” not only has debug info, it also disables some inlines to make the binary easier to debug. Thus RelWithDebInfo is slower than Release.
Cross Android Compiling
1 | ./build.sh --parallel --config Release --android --build_shared_lib --android_sdk_path /Users/luohanjie/Library/Android/sdk --android_ndk_path /Users/luohanjie/Library/Android/sdk/ndk/27.0.12077973 --android_abi arm64-v8a --android_api 29 |
Please use NDK 26 as it has a version of clang that handles the bfloat16 type.