# What do the parameters in the TFLiteRunner command mean, and why does NNAPI delegate fail while Neuron Delegate succeeds?

**URL:** <https://genio-community.mediatek.com/t/what-do-the-parameters-in-the-tfliterunner-command-mean-and-why-does-nnapi-delegate-fail-while-neuron-delegate-succeeds/471>\
**Category:** NeuroPilot - Analytical AI\
**Tags:** AI, Question, Android\
**Created:** [June 18, 2025, 10:33am UTC](https://genio-community.mediatek.com/t/what-do-the-parameters-in-the-tfliterunner-command-mean-and-why-does-nnapi-delegate-fail-while-neuron-delegate-succeeds/471 "2025-06-18T10:33:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apuovia](https://yyz2.discourse-cdn.com/flex004/user_avatar/genio-community.mediatek.com/apuovia/32/158_2.png) [@apuovia](https://genio-community.mediatek.com/u/apuovia)\
**Post date:** [June 18, 2025, 10:33am UTC](https://genio-community.mediatek.com/t/what-do-the-parameters-in-the-tfliterunner-command-mean-and-why-does-nnapi-delegate-fail-while-neuron-delegate-succeeds/471/1 "2025-06-18T10:33:09Z")

</div>

When running TFLiteRunner on a Genio platform, the following command:

```auto

./TFLiteRunner -a 1 -s 2 -r 1 -c 11 -m model.tflite

```

fails with error messages such as:

```auto

ERROR: NN API returned error ANEURALNETWORKS_BAD_DATA...

ERROR: Node number 8 (TfLiteNnapiDelegate) failed to prepare.

ERROR: MTKEXT_DEPTHWISE_CONV_2D operator is not implemented.

```

But when using:

```auto

 ./TFLiteRunner -a 2 -s 2 -r 1 -c 11 -m model.tflite

```

inference completes successfully.

1. What do each of these command line parameters (`-a`, `-s`, `-r`, `-c`, `-m`) mean?

2. Does this outcome mean only the MediaTek Neuron Delegate (`-a 2`) is supported, while NNAPI Delegate (`-a 1`) doesn’t work for this model?

---

<div class="post-metadata">

**Author:** ![joying.kuo](https://yyz2.discourse-cdn.com/flex004/user_avatar/genio-community.mediatek.com/joying.kuo/32/167_2.png) [@joying.kuo](https://genio-community.mediatek.com/u/joying.kuo)\
**Post date:** [July 5, 2025, 6:53am UTC](https://genio-community.mediatek.com/t/what-do-the-parameters-in-the-tfliterunner-command-mean-and-why-does-nnapi-delegate-fail-while-neuron-delegate-succeeds/471/2 "2025-07-05T06:53:44Z")

</div>

**Command parameter meanings:**

- `-a 1`: Use `NNAPI delegate` (Google’s standard Android Neural Networks API)
- `-a 2`: Use `Neuron delegate` (MediaTek’s optimized runtime for their NPU)
- `-s 2`: Use random input data for inference
- `-r 1`: Allow FP32 model to be computed using reduced precision (FP16)
- `-c 11`: Loop (repeat) inference 11 times
- `-m`: Path to the `.tflite` model

**Interpretation of results:**

- The error log with `-a 1` indicates the model uses `MTKEXT_DEPTHWISE_CONV_2D`, which is not supported by the stock NNAPI delegate on this platform.
- The successful run with `-a 2` shows the MediaTek Neuron delegate supports this custom operator, and thus inference works.
- Therefore, **for this model and platform, only NeuroPilot TFLite Shim API + Neuron Delegate is supported.**  
TFLite Shim API + NNAPI delegate cannot process models with MediaTek custom operators.
