2

NNAPI is available on android 8.1. But I want to use the NNAPI on android 7&8(arm64). the NNAPI is used by tensorflow-lite.

Where can I download libneuralnetworks.so?

xhsoldier
  • 575
  • 6
  • 31

1 Answers1

4

Unfortunately NNAPI is only available on devices with Android 8.1 or later. And it currently does not have a support lib to work on older devices.

If your primary usecase is Tensorflow-Lite, you can rely on its CPU implementation on older devices. Actually, if you enabled NNAPI delegation in TFLite, it will try look for libneuralnetworks.so and use it when it's available. And it will fallback to its CPU implementation when libneuralnetworks.so is not available.

Miao Wang
  • 1,120
  • 9
  • 12
  • How about compile the android 8.1 soure file, and copy the libneuralnetworks.so library to androd 7 devices? – xhsoldier Jun 11 '18 at 07:22
  • I use NNAPI 1.1, but on android 8.1, it only has NNAPI1.0 such as XiaoMi 8SE – xhsoldier Sep 29 '18 at 09:24
  • Is there any specific APIs you are relying on from NNAPI 1.1? The new NNAPI delegate in TFLite supports both NNAPI 1.0 and 1.1 and partial delegation. I would suggest give that a try. Let me know if you have any questions, or need help with using NNAPI through TFLite. – Miao Wang Oct 03 '18 at 23:23