mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
* initial setup and rename "how to" to "setup" * move API to main nav * move api to main nav * add get starated, rework nav order * rename to install move mds out of install section * update api nav and home page * add install docs and python qs updates * python get started work * remove c and obj c for now * move java, python, and obj-c docs under api folder * move java api html to iframe (ugh) * remove api docs w/o details, move api text getstar * remove api docs wo detail updates get started * remvoe iframes * move eco system to main nav * fix api buttons * added more examples moved intro to ORT * fix links * fix get started titles * fix get started titles * fix more links * fix more links * more link fixes * fix nav remove inferencing and training subnav * fix top nav remove inference and training nav * fix title * fix tutorials nav hierarchy * fix python api button * add tenorflow keras example * fix quickstart toc * add imports fix spacing * fix links * update nav and python get started page * move ort training example, add coming soon for iot * update C# get started * fix spacing on quantization * Add some js get started content * fix formatting * fix typo * removed onnx-pytorch and onnx-tf * updated pip install torch and added links iot page * added pytorch tutorial heirarchy * updated web to docs soon added release blog link * add web link
2.4 KiB
2.4 KiB
| title | parent | grand_parent | nav_order |
|---|---|---|---|
| Enabling NNAPI or CoreML Execution Providers | Deploy ONNX Runtime Mobile | Tutorials | 6 |
Using NNAPI and CoreML with ONNX Runtime Mobile
- Usage of NNAPI on Android platforms is via the NNAPI Execution Provider (EP).
- See the NNAPI Execution Provider documentation for more details.
- Usage of CoreML on iOS and macOS platforms is via the CoreML EP.
- See the CoreML Execution Provider documentation for more details.
The pre-built ONNX Runtime Mobile package includes the NNAPI EP on Android, and the CoreML EP on iOS.
If performing a custom build of ONNX Runtime, support for the NNAPI EP or CoreML EP must be enabled when building.
Create a minimal build with NNAPI EP or CoreML EP support
Please see the instructions for setting up the Android or iOS environment required to build. The Android build can be cross-compiled on Windows or Linux. The iOS/macOS build must be performed on a mac machine.
Once you have all the necessary components setup, follow the instructions to create the custom build, with the following changes:
- Replace
--minimal_buildwith--minimal_build extendedto enable support for execution providers that dynamically create kernels at runtime, which is required by the NNAPI EP and CoreML EP. - Add
--use_nnapito include the NNAPI EP in the build - Add
--use_coremlto include the CoreML EP in the build
Example build commands with the NNAPI EP enabled:
- Windows example:
<ONNX Runtime repository root>.\build.bat --config MinSizeRel --android --android_sdk_path D:\Android --android_ndk_path D:\Android\ndk\21.1.6352462\ --android_abi arm64-v8a --android_api 29 --cmake_generator Ninja --minimal_build extended --use_nnapi --disable_ml_ops --disable_exceptions --build_shared_lib --skip_tests --include_ops_by_config <config file from model conversion> - Linux example:
<ONNX Runtime repository root>./build.sh --config MinSizeRel --android --android_sdk_path /Android --android_ndk_path /Android/ndk/21.1.6352462/ --android_abi arm64-v8a --android_api 29 --minimal_build extended --use_nnapi --disable_ml_ops --disable_exceptions --build_shared_lib --skip_tests --include_ops_by_config <config file from model conversion>
Next: Limitations