Chinbold Gansukh
Chinbold Gansukh

Reputation: 1

What will happen if I try to use GPU delegate under android 8.1

Here below is the system architecture for NNAPI. enter image description here

The NNAPI is available on Android 8.1 (API level27) or higher. What will happen if I try to use GPU delegate under android 8.1?

Upvotes: 0

Views: 638

Answers (2)

galarragas
galarragas

Reputation: 44

Tensorflow's GPU delegate is not using NNAPI (see the TFLite documentation).

A couple of corrections on Shree's answer.

  • NNAPI will be delegating to GPU or any other available device even in Android 8.1 depending on the availability of NNAPI implementations.
  • The ANeuralNetworksCompilation_createForDevices() API is used when you want to address a specific set of devices, if you use ANeuralNetworksCompilation_create() the device selection will be done by NNAPI.
  • The choice between the two different API (createForDevices or create) is controlled by the acceleratorName option in the delegate creation.

Upvotes: 1

ShreeVidhya
ShreeVidhya

Reputation: 123

NNAPI is available on all Android devices running Android 8.1 (API level 27) or higher

Only the CPU fallback was available on Oreo MR1(8.1.0)

Kindly refer to the following discussion about TFLite demo app performance with NNAPI on Pixel 2 device (Android 8.1) - https://github.com/tensorflow/tensorflow/issues/19317 - This claims that no improvement in the performance because there is no GPU and DSP NN drivers. So when NNAPI is called, it will fall back to CPU.

Since API level 29 (Android 10) only, ANeuralNetworksCompilation_createForDevices() is supported by NNAPI - This will create a ANeuralNetworksCompilation to compile the given model for a specified set of devices (GPU and DSP)

Upvotes: 0

Related Questions