Updated documentation for reduced op build process. (#10152)

This commit is contained in:
Edward Chen 2022-01-04 09:33:52 -08:00 committed by GitHub
parent 8bde251409
commit b89d01bcdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

11
docs/build/custom.md vendored
View file

@ -34,7 +34,14 @@ The operators that are included are specified at build time, in a [configuration
**`--include_ops_by_config`**
* Add `--include_ops_by_config <config file produced during model conversion> --skip_tests` to the build parameters.
* NOTE: Building will edit some of the ONNX Runtime source files to exclude unused kernels. If you wish to go back to creating a full build, or wish to change the operator kernels included, you MUST run `git reset --hard` or `git checkout HEAD -- ./onnxruntime/core/providers` from the root directory of your local ONNX Runtime repository to undo these changes.
* NOTE: Building will edit some of the ONNX Runtime source files to exclude unused kernels.
In particular, this source modification will be done during the "update" build phase, which is enabled by default or explicitly with the `--update` build parameter.
**ONNX Runtime version 1.10 and earlier:** The source files are modified directly. If you wish to go back to creating a full build, or wish to change the operator kernels included, you MUST run `git reset --hard` or `git checkout HEAD -- ./onnxruntime/core/providers` from the root directory of your local ONNX Runtime repository to undo these changes.
**ONNX Runtime version 1.11 and later:** Updated versions of the source files are generated in the build directory so there is no need to undo source file changes.
### Option to reduce types supported by the required operators
@ -67,7 +74,7 @@ A minimal build has the following limitations:
## Other customizations
### Disable exceptions
**`--disable_exceptions`**
* Any locations that would have thrown an exception will instead log the error message and call abort().

View file

@ -6,11 +6,11 @@ redirect_from: /docs/how-to/mobile-performance-tuning
---
{::options toc_levels="2" /}
# ONNX Runtime Mobile Performance Tuning
# ONNX Runtime Mobile Performance Tuning
Learn how different optimizations affect performance, and get suggestions for performance testing with ORT format models.
ONNX Runtime Mobile can be used to execute ORT format models using NNAPI (via the NNAPI Execution Provider (EP)) on Android platforms, and CoreML (via the CoreML EP) on iOS platforms.
ONNX Runtime Mobile can be used to execute ORT format models using NNAPI (via the NNAPI Execution Provider (EP)) on Android platforms, and CoreML (via the CoreML EP) on iOS platforms.
First, please review the introductory details in [using NNAPI with ONNX Runtime Mobile](../execution-providers/NNAPI-ExecutionProvider.md) and [using CoreML with ONNX Runtime](../execution-providers/CoreML-ExecutionProvider.md).
@ -111,7 +111,7 @@ To create an NNAPI-aware ORT format model please follow these steps.
<ONNX Runtime repository root>/build.sh --config RelWithDebInfo --use_nnapi --build_shared_lib --build_wheel --parallel
```
**NOTE** if you have previously done a minimal build you will need to run `git reset --hard` to make sure any operator kernel exclusions are reversed prior to performing the 'full' build. If you do not, you may not be able to load the ONNX format model due to missing kernels.
**NOTE**: For **ONNX Runtime version 1.10 and earlier**, if you have previously done a minimal build with reduced operator kernels you will need to run `git reset --hard` to make sure any operator kernel exclusions are reversed prior to performing the 'full' build. If you do not, you may not be able to load the ONNX format model due to missing kernels.
2. Install the python wheel from the build output directory.
- Windows : This is located in `build/Windows/<config>/<config>/dist/<package name>.whl`.

View file

@ -25,7 +25,7 @@ To create a reduced operator configuration file, run the script [create_reduced_
The kernel configuration file can be manually edited as needed. The configuration can be created from either ONNX or ORT format models.
```bash
```
create_reduced_build_config.py --help
usage: Script to create a reduced build config file from ONNX or ORT format model/s. [-h] [-f {ONNX,ORT}] [-t] model_path_or_dir config_path