Search code examples
androidtensorflowtensorflow-litehexagon-dsp

Running Tensorflow Lite demo models on Hexagon DSP


I've built the Tensorflow Lite demo camera app using the pre-trained mobilenet model as described at https://www.tensorflow.org/lite/convert/cmdline_examples.

As I understand the Android NNAPI (neural network api) supports the Qualcomm Hexagon DSP processor. If possible, I'd like to get the demo app from Tensorflow Lite to run on the Hexagon DSP chip on my phone, however documentation on recompiling it this way is thin.

A paper titled AI Benchmark: Running Deep Neural Networks on Android Smartphones, released a few months ago on Arxiv claims to have this working using the Android NNAPI and Tensorflow Lite on many devices, though the published results from devices in the wild seem to only run against CPU targets.

I'm experimenting with a OnePlus 5 mobile phone which has a Hexagon 682 DSP. I'm running android 8.1.0. As far as I understand all relevant APIs should support these versions.

Is anyone familiar with what is necessary to coerce the NNAPI into targeting the Hexagon DSP?


Solution

  • This Github issue provides some information on the roadmap for NNAPI with HVX support. If you'd like an update, I suggest creating a Github issue and assigning rockyrhodes@.