You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILD.md
+28-12Lines changed: 28 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The complete list of build options can be found by running `./build.sh (or .\bui
99
99
* [Intel DNNL/MKL-ML](#DNNL-and-MKLML)
100
100
* [Intel nGraph](#nGraph)
101
101
* [Intel OpenVINO](#openvino)
102
-
* [Android NNAPI](#Android)
102
+
* [Android NNAPI](#Android-NNAPI)
103
103
* [Nuphar Model Compiler](#Nuphar)
104
104
* [DirectML](#DirectML)
105
105
@@ -111,6 +111,7 @@ The complete list of build options can be found by running `./build.sh (or .\bui
111
111
**Architectures**
112
112
* [x86](#x86)
113
113
* [ARM](#ARM)
114
+
* [Android](#Android)
114
115
115
116
---
116
117
@@ -276,18 +277,9 @@ For more information on OpenVINO Execution Provider's ONNX Layer support, To
276
277
277
278
---
278
279
279
-
### Android
280
-
281
-
#### Cross compiling on Linux
282
-
283
-
1. Get Android NDK from https://developer.android.com/ndk/downloads. Please unzip it after downloading.
280
+
### Android NNAPI
284
281
285
-
2. Get a pre-compiled protoc from [here](https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip). Please unzip it after downloading.
286
-
287
-
3. Denote the unzip destination in step 1 as $ANDROID_NDK, append `-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DONNX_CUSTOM_PROTOC_EXECUTABLE=path/to/protoc` to your cmake args, run cmake and make to build it.
288
-
289
-
#### Notes
290
-
* For 32-bit devices, replace `-DANDROID_ABI=arm64-v8a` with `-DANDROID_ABI=armeabi-v7a`.
282
+
See information on the NNAPI Execution Provider [here](./docs/execution_providers/NNAPI-ExecutionProvider.md).
291
283
292
284
---
293
285
@@ -540,3 +532,27 @@ ls -l /code/onnxruntime/build/Linux/MinSizeRel/dist/*.whl
540
532
541
533
2. Use `.\build.bat` and specify `--arm` or `--arm64` as the build option to start building. Preferably use `Developer Command Prompt for VS` or make sure all the installed cross-compilers are findable from the command prompt being used to build using the PATH environmant variable.
542
534
535
+
---
536
+
537
+
### Android
538
+
539
+
#### Pre-Requisites
540
+
541
+
Install Android NDK from https://developer.android.com/ndk/downloads
If you want to use NNAPI Execution Provider on Android, see [docs/execution_providers/NNAPI-ExecutionProvider.md](/docs/execution_providers/NNAPI-ExecutionProvider.md).
[Android Neural Networks API (NNAPI)](https://developer.android.com/ndk/guides/neuralnetworks) is a unified interface to CPU, GPU, and NN accelerators on Android. It is supported by onnxruntime via [DNNLibrary](https://github.com/JDAI-CV/DNNLibrary).
4
+
5
+
## Minimum requirements
6
+
7
+
The NNAPI EP requires Android devices with Android 8.1 or higher.
8
+
9
+
## Build NNAPI EP
10
+
11
+
### Pre-Requisites
12
+
13
+
To build onnxruntime with NNAPI EP, install Android NDK first (see [BUILD.md](/BUILD.md#android))
14
+
15
+
### Build Instructions
16
+
17
+
The basic commands are following. There are also some other parameters for building the Android version. See [BUILD.md](/BUILD.md#android) for the details.
0 commit comments