Frequently Asked Questions

How do I know if my model was delegated correctly?

When the delegate is applied, the TFLite framework will log a message in the form of TfLiteQnnDelegate delegate: X nodes delegated out of Y nodes with N partitions. This message will either be printed to stdout or will show up in ADB Logcat.

Which operators are supported by the Qualcomm® AI Engine Direct Delegate?

See the list of support:Supported Operators.

What to do if I am getting “ERROR: Cannot Open QNN library”?

This error occurs when the Qualcomm® AI Engine Direct backend library cannot be found during the dynamic loading process. There are two ways to solve this problem. The first solution is simply to prepend the directory where the Qualcomm® AI Engine Direct backend library resides on device, to the $LD_LIBRARY_PATH environment variable before execution. See On Device Environment Setup for examples. The second solution is to use the TfLiteQnnDelegateOptions.library_path delegate option to pass in the path of the Qualcomm® AI Engine Direct backend library.

What to do if I am getting Qualcomm® AI Engine Direct HTP backend graph finalize error?

When using the Qualcomm® AI Engine Direct HTP backend, the following error may occur:

DspTransport.openSession qnn_open failed, 0x80000406
IDspTransport: Unknown rpc status 0x80000406
DspTransport.call failed,cannot open session, error 0xffffffff
ERROR: qnn_graph_finalize failed. Error 1

This error occurs when the Qualcomm® AI Engine Direct HTP Stub library cannot find the respective Skel library. Make sure this library has been pushed on device first. To resolve this issue, there are two solutions. The first solution is to prepend the path of the directory where the Skel library resides to the $ADSP_LIBRARY_PATH environment variable. See On Device Environment Setup for examples. Alternatively, the TfLiteQnnDelegateOptions.skel_library_dir delegate option can be used, which will automatically setup the $ADSP_LIBRARY_PATH variable. The value should be the absolute path to the directory of the Skel, without the filename.

Further, though we work hard to ensure robustness, it is still possible that some other errors happen while the graph is being finalized. In this case, we provide a skip option in the Delegate C-API. A user might examine which node causes failures and might be able to skip its delegation to Qualcomm® AI Engine Direct Delegate.

What to do if I am getting errors about Qualcomm® AI Engine Direct backend library version mismatch?

Qualcomm® AI Engine Direct Delegate will only support the same version of Qualcomm® AI Engine Direct backends.

How do I get more information on errors and warning?

The log_level option will change the verbosity of both the Qualcomm® AI Engine Direct Delegate as well as the Qualcomm® AI Engine Direct backends. Certain backends will print verbose messages which can be helpful during debugging.

How can I tell which operator was not delegated?

If the log_level option is set to INFO or higher, the delegate will log a [Qnn Delegate] op type X not supported message. Here X is a number that corresponds to the TFLite builtin operator code.