-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
323 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,36 +23,14 @@ PRODUCT_PACKAGES += [email protected] | |
</pre> | ||
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 | ||
<pre> | ||
<ANDROID_ROOT>/out/target/product/<product>/system/vendor/bin/hw/[email protected] | ||
</pre> | ||
`<ANDROID_ROOT>/out/target/product/<product>/system/vendor/bin/hw/[email protected]` | ||
|
||
### Testing | ||
|
||
1. Run the ArmNN driver service executable in the background | ||
<pre> | ||
adb shell /system/vendor/bin/hw/[email protected] & | ||
</pre> | ||
<pre>adb shell /system/vendor/bin/hw/[email protected] &</pre> | ||
2. Run some code that exercises the Android Neural Networks API, for example Android's | ||
`NeuralNetworksTest` unit tests (note this is an optional component that must be built). | ||
<pre> | ||
adb shell /data/nativetest/NeuralNetworksTest/NeuralNetworksTest > NeuralNetworkTest.log | ||
</pre> | ||
<pre>adb shell /data/nativetest/NeuralNetworksTest/NeuralNetworksTest > 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. | ||
|
||
### Using ClTuner | ||
|
||
ClTuner is a feature of the Compute Library that finds optimum values for OpenCL tuning parameters. 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: | ||
|
||
1. Run the ArmNN driver service executable in tuning mode. The path to the tuning data must be writable by the service: | ||
<pre> | ||
adb shell /system/vendor/bin/hw/[email protected] --cl-tuned-parameters-file <PATH_TO_TUNING_DATA> --cl-tuned-parameters-mode UpdateTunedParameters & | ||
</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). | ||
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/[email protected] --cl-tuned-parameters-file <PATH_TO_TUNING_DATA> & | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,14 +26,14 @@ fi | |
if [ ! -d armnn ]; then | ||
echo "++ Downloading armnn" | ||
|
||
git clone [email protected]:ARM-software/armnn.git armnn | ||
git clone [email protected]:ARM-software/armnn armnn | ||
AssertZeroExitCode "Cloning armnn failed" | ||
fi | ||
|
||
if [ ! -d clframework ]; then | ||
echo "++ Downloading clframework" | ||
|
||
git clone [email protected]:ARM-software/ComputeLibrary.git clframework | ||
git clone [email protected]:ARM-software/ComputeLibrary clframework | ||
AssertZeroExitCode "Cloning clframework failed" | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.