Forums - TFLITE NNAPI Source build

4 posts / 0 new
Last post
TFLITE NNAPI Source build
mike.rawding
Join Date: 7 Dec 20
Posts: 3
Posted: Mon, 2021-09-13 12:34

Hello,

I am trying to install tensorflow lite on an EVT RB5  board with the preinstalled Ubuntu Linaro OS.

The software reference guide here:

https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-reference-manual/machine-learning/tensorflow

Says that NNAPI and DSP Delegate supports in Tflite are supported. However, I am unable to compile tensorflow lite with NNAPI enabled because the image is missing the android ndk libraries that are required. What packages/sdks do I neUed to install to build this correctly.

I found that my system is missing preproccesor defiinition: __ANDROID___ which causes tflite to build correctly but disable NNAPI.

After forcing that definition it is missing headers and libraries like android/api-level.h

Is this something that is still in the works? Or am I missing something. I see that the hexagon sdk has the relevant android ndk tool chain, but I do not know of instructions on how to build the android sdk and install on the RB5.

Also after installing the snpe toolkit and running the runtime validator only GPU prerequisites are present.

I would really appreciate an update on this issue or a push in the right direction! Thank you.

  • Up0
  • Down0
kpoliset
Join Date: 28 Aug 19
Posts: 8
Posted: Wed, 2021-09-15 18:06

Hello mike,

Can you please clarify few things.

You mentioned the board is EVT RB5, May I know where you got it from?

The Linaro OS is either Debian or OpenEmbedded, not Ubuntu. Can you confirm which OS is on the board?

Thank you

  • Up0
  • Down0
mike.rawding
Join Date: 7 Dec 20
Posts: 3
Posted: Mon, 2021-09-20 11:52

Hi,

Yes sorry for misspeaking, the OS is the linaro debian version.

The boards I have is a pre release from ModalAI.

  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Thu, 2021-09-23 13:48

Hi Mike,

The software reference manual that you are refering to on QDN is for the LE and LU linux versions available from Thundercomm using the SDK Manager. I think the upstream versions from Linaro might not be feature compatible with the LE/LU versions.
But I am not sure if that is the source of your error.

Is there any way you can reach out to Linaro or ModalAI for support? |
ModalAI releases their own version of OS for the RB5 flight boards.

https://docs.modalai.com/Qualcomm-Flight-RB5-system-image/

I am not really sure if the Linaro version would work on the drone boards.
I see you have posted on the modalAI forums as well:
https://forum.modalai.com/topic/422/building-tensorflow-lite-from-source-w-nnapi

I think they might be the best resource to support you on this.

Best Regards,

Rajan.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.