Optimize the calling of IsLayerSupported().

!armnn:8742

  * Done as part of 22.11/23.02 innovation days.
  * IsLayerSupported() is called in model prepare (delegate, android-nn-driver and shim/support_library)
    and again in ArmNN once model optimization is performed.
  * From calling IsLayerSupported() the first time, we should know that the layers are supported
    and what backend they are supported on.
  * Solution is to set the BackendId of the IConnectableLayer when IsLayerSupported() is called the first time,
  * In the Optimize() function we then check if the backend is set. If so, we do not call IsLayerSupported() again.
  * In the case a layer that is supported gets optimized, then the BackendId of that layer get set to "Unknown"
    for the new optimized layer and IsLayerSupported() will get called on the newly optimized layer.

Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: Ie5c6c9cd10d81f90b1ee78dd6e3442f353b6c109
5 files changed
tree: 07d5777ed369182b80e27d292f871c2b0e9e44a7
  1. .gitignore
  2. .gitignore.license
  3. 1.0/
  4. 1.1/
  5. 1.2/
  6. 1.3/
  7. Android.bp
  8. Android.mk
  9. ArmnnDevice.cpp
  10. ArmnnDevice.hpp
  11. ArmnnDriver.hpp
  12. ArmnnDriverImpl.cpp
  13. ArmnnDriverImpl.hpp
  14. ArmnnPreparedModel.cpp
  15. ArmnnPreparedModel.hpp
  16. ArmnnPreparedModel_1_2.cpp
  17. ArmnnPreparedModel_1_2.hpp
  18. ArmnnPreparedModel_1_3.cpp
  19. ArmnnPreparedModel_1_3.hpp
  20. CacheDataHandler.cpp
  21. CacheDataHandler.hpp
  22. ConversionUtils.cpp
  23. ConversionUtils.hpp
  24. ConversionUtils_1_2.hpp
  25. ConversionUtils_1_3.hpp
  26. DriverOptions.cpp
  27. DriverOptions.hpp
  28. LICENSE
  29. LICENSE.spdx
  30. LICENSES/
  31. ModelToINetworkConverter.cpp
  32. ModelToINetworkConverter.hpp
  33. NnapiSupport.txt
  34. NnapiSupport.txt.license
  35. README.md
  36. README.md.license
  37. RequestThread.cpp
  38. RequestThread.hpp
  39. RequestThread_1_3.cpp
  40. RequestThread_1_3.hpp
  41. SECURITY.md
  42. SECURITY.md.license
  43. SystemPropertiesUtils.hpp
  44. Utils.cpp
  45. Utils.hpp
  46. android.hardware.neuralnetworks@1.0-service-armnn.rc
  47. android.hardware.neuralnetworks@1.0-service-armnn.rc.license
  48. android.hardware.neuralnetworks@1.1-service-armnn.rc
  49. android.hardware.neuralnetworks@1.1-service-armnn.rc.license
  50. android.hardware.neuralnetworks@1.2-service-armnn.rc
  51. android.hardware.neuralnetworks@1.2-service-armnn.rc.license
  52. android.hardware.neuralnetworks@1.3-service-armnn.rc
  53. android.hardware.neuralnetworks@1.3-service-armnn.rc.license
  54. docs/
  55. service.cpp
  56. setup.sh
  57. test/
README.md

Arm NN Android Neural Networks driver

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

For documentation about integrating this driver into an Android tree, see Integrator Guide

For FAQs and troubleshooting advice, see FAQ.md

License

The android-nn-driver is provided under the MIT license. See LICENSE for more information. Contributions to this project are accepted under the same license.

Individual files contain the following tag instead of the full license text.

SPDX-License-Identifier: MIT

This enables machine processing of license information based on the SPDX License Identifiers that are available here: http://spdx.org/licenses/