aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2021-02-23 10:47:03 +0000
committerKeith Davis <keith.davis@arm.com>2021-02-23 14:52:16 +0000
commit7e4f7b181908478b3f9c0a23dd4a26b476542e30 (patch)
tree886988d84c9b132150c1310abee6ad95525fda20
parentf5ca16c90370d16442770a35f91a83c7d2f5ff9e (diff)
downloadandroid-nn-driver-branches/android-nn-driver_21_02.tar.gz
Updating Readme and Integrator guidev21.02branches/android-nn-driver_21_02
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Icd649285e44c427ec6c973cc313339276e6fb8c8
-rw-r--r--README.md4
-rw-r--r--docs/IntegratorGuide.md42
2 files changed, 20 insertions, 26 deletions
diff --git a/README.md b/README.md
index 35f2db0..9d5bfdd 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# ArmNN Android Neural Networks driver
+# Arm NN Android Neural Networks driver
-This directory contains the ArmNN driver for the Android Neural Networks API, implementing the android.hardware.neuralnetworks@1.0, android.hardware.neuralnetworks@1.1, android.hardware.neuralnetworks@1.2 and android.hardware.neuralnetworks@1.3 HALs.
+This directory contains the Arm NN driver for the Android Neural Networks API, implementing the android.hardware.neuralnetworks@1.0, android.hardware.neuralnetworks@1.1, android.hardware.neuralnetworks@1.2 and android.hardware.neuralnetworks@1.3 HALs.
For more information about supported operations and configurations, see [NnapiSupport.txt](NnapiSupport.txt)
diff --git a/docs/IntegratorGuide.md b/docs/IntegratorGuide.md
index 2d4ebdb..82177f7 100644
--- a/docs/IntegratorGuide.md
+++ b/docs/IntegratorGuide.md
@@ -14,37 +14,31 @@ This document describes how to integrate the Arm NN Android NNAPI driver into an
1. Place this source directory at `<ANDROID_ROOT>/vendor/arm/android-nn-driver`
2. Run setup.sh
-3. Update the Android build environment to add the ArmNN driver. This ensures that the driver service
+3. Update the Android build environment to add the Arm NN driver. This ensures that the driver service
is built and copied to the `system/vendor/bin/hw` directory in the Android image.
To update the build environment, add to the contents of the variable `PRODUCT_PACKAGES`
within the device-specific makefile that is located in the `<ANDROID_ROOT>/device/<manufacturer>/<product>`
directory. This file is normally called `device.mk`:
-For Android P, Q or R, using NN API version (1.0), the following should be added to `device.mk`:
-<pre>
-PRODUCT_PACKAGES += android.hardware.neuralnetworks@1.0-service-armnn
-</pre>
-
-For Android P, Q or R, a new version of the NN API is available (1.1),
-thus the following should be added to `device.mk` instead:
+`Android.mk` contains the module definition of all versions (1.0, 1.1, 1.2 and 1.3) of the Arm NN driver.
+For Android P, a new version of NN API is available (1.1), thus the following should be added to `device.mk` instead:
<pre>
PRODUCT_PACKAGES += android.hardware.neuralnetworks@1.1-service-armnn
-</pre> `Android.mk` contains the module definition of both versions of the ArmNN driver.
+</pre>
For Android Q, a new version of the NN API is available (1.2),
thus the following should be added to `device.mk` instead:
<pre>
PRODUCT_PACKAGES += android.hardware.neuralnetworks@1.2-service-armnn
-</pre> `Android.mk` contains the module definition of all three versions (1.0, 1.1 and 1.2) of the ArmNN driver.
+</pre>
For Android R, new version of the NN API is available (1.3),
thus the following should be added to `device.mk` instead:
<pre>
PRODUCT_PACKAGES += android.hardware.neuralnetworks@1.3-service-armnn
</pre>
-`Android.mk` contains the module definition of all versions (1.0, 1.1, 1.2 and 1.3) of the ArmNN driver.
-Similarly, the Neon, CL or reference backend can be enabled/disabled by setting ARMNN_COMPUTE_CL_ENABLE,
+Similarly, the Neon, CL or Reference backend can be enabled/disabled by setting ARMNN_COMPUTE_CL_ENABLE,
ARMNN_COMPUTE_NEON_ENABLE or ARMNN_REF_ENABLE in `device.mk`:
<pre>
ARMNN_COMPUTE_CL_ENABLE := 1
@@ -66,15 +60,15 @@ For Android P use HAL version 1.1 as below. For Android Q substitute 1.2 where n
```
4. Build Android as normal, i.e. run `make` in `<ANDROID_ROOT>`
-5. To confirm that the ArmNN driver has been built, check for driver service executable at
+5. To confirm that the Arm NN driver has been built, check for the driver service executable at
Android P
<pre>
<ANDROID_ROOT>/out/target/product/<product>/system/vendor/bin/hw
</pre>
-For example, if the ArmNN driver has been built with the NN API 1.0, check for the following file:
+For example, if the Arm NN driver has been built with the NN API 1.1, check for the following file:
<pre>
-<ANDROID_ROOT>/out/target/product/<product>/system/vendor/bin/hw/android.hardware.neuralnetworks@1.0-service-armnn
+<ANDROID_ROOT>/out/target/product/<product>/system/vendor/bin/hw/android.hardware.neuralnetworks@1.1-service-armnn
</pre>
Android Q and later has a different path:
@@ -84,7 +78,7 @@ Android Q and later has a different path:
### Testing
-1. Run the ArmNN driver service executable in the background.
+1. Run the Arm NN driver service executable in the background.
Use the corresponding version of the driver for the Android version you are running.
i.e
android.hardware.neuralnetworks@1.1-service-armnn for Android P,
@@ -100,8 +94,8 @@ adb shell /system/vendor/bin/hw/android.hardware.neuralnetworks@1.2-service-armn
<pre>
adb shell /data/nativetest/NeuralNetworksTest_static/NeuralNetworksTest_static > NeuralNetworkTest.log
</pre>
-3. To confirm that the ArmNN driver is being used to service the Android Neural Networks API requests,
-check for messages in logcat with the `ArmnnDriver` tag.
+3. To confirm that the Arm NN driver is being used to service the Android Neural Networks API requests,
+check for messages in logcat with the `ArmnnDriver` tag. Please note that you need to add ARMNN_DRIVER_DEBUG := 1 to the 'device-vendor.mk' for the logcat to be visible.
### Using the GPU tuner
@@ -110,17 +104,17 @@ There are three levels of tuning: exhaustive, normal and rapid.
Exhaustive means that all lws values are tested.
Normal means that a reduced number of lws values are tested, but that generally is sufficient to have a performance close enough to the exhaustive approach.
Rapid means that only 3 lws values should be tested for each kernel.
-The recommended way of using it with ArmNN is to generate the tuning data during development of the Android image for a device, and use it in read-only mode during normal operation:
+The recommended way of using it with Arm NN is to generate the tuning data during development of the Android image for a device, and use it in read-only mode during normal operation:
-1. Run the ArmNN driver service executable in tuning mode. The path to the tuning data must be writable by the service.
-The following examples assume that the 1.0 version of the driver is being used:
+1. Run the Arm NN driver service executable in tuning mode. The path to the tuning data must be writable by the service.
+The following examples assume that the 1.1 version of the driver is being used:
<pre>
-adb shell /system/vendor/bin/hw/android.hardware.neuralnetworks@1.0-service-armnn --cl-tuned-parameters-file &lt;PATH_TO_TUNING_DATA&gt; --cl-tuned-parameters-mode UpdateTunedParameters --cl-tuning-level exhaustive &
+adb shell /system/vendor/bin/hw/android.hardware.neuralnetworks@1.1-service-armnn --cl-tuned-parameters-file &lt;PATH_TO_TUNING_DATA&gt; --cl-tuned-parameters-mode UpdateTunedParameters --cl-tuning-level exhaustive &
</pre>
2. Run a representative set of Android NNAPI testing loads. In this mode of operation, each NNAPI workload will be slow the first time it is executed, as the tuning parameters are being selected. Subsequent executions will use the tuning data which has been generated.
3. Stop the service.
-4. Deploy the tuned parameters file to a location readable by the ArmNN driver service (for example, to a location within /vendor/etc).
+4. Deploy the tuned parameters file to a location readable by the Arm NN driver service (for example, to a location within /vendor/etc).
5. During normal operation, pass the location of the tuning data to the driver service (this would normally be done by passing arguments via Android init in the service .rc definition):
<pre>
-adb shell /system/vendor/bin/hw/android.hardware.neuralnetworks@1.0-service-armnn --cl-tuned-parameters-file &lt;PATH_TO_TUNING_DATA&gt; &
+adb shell /system/vendor/bin/hw/android.hardware.neuralnetworks@1.1-service-armnn --cl-tuned-parameters-file &lt;PATH_TO_TUNING_DATA&gt; &
</pre>