# External delegate options for QNN delegate Source: [https://docs.qualcomm.com/doc/80-70014-54/topic/external-delegate-options-for-qnn-delegate.html](https://docs.qualcomm.com/doc/80-70014-54/topic/external-delegate-options-for-qnn-delegate.html) The external delegate interface dynamically loads the Qualcomm AI Engine Direct delegate. Therefore, it does not have static information about the Qualcomm AI Engine Direct delegate options. The external delegate sends strings as key and value pairs to the Qualcomm AI Engine Direct delegate, which parses them as options. The application using the external delegate interface must know the accepted key and value options strings beforehand. The following table lists the key value option strings that are available in the Qualcomm AI Engine Direct delegate: Table : Key value option strings | Option key | Option value | Default value | Mandatory | Description | | --- | --- | --- | --- | --- | | backend\_type | gpu and htp | NA | Yes | The backend Qualcomm AI Engine Direct library used for opening and
running the graph with. | | gpu\_precision | 0, 1, 2, 3 | 2 = Float16 for best performance | No | Precision for the GPU backend that defines the optimization levels of
the graph tensors that are either input or output tensors.


| | gpu\_performance\_mode | 0, 1, 2, 3 | 0 = Default | No | Flag to provide precision modes supported by the GPU backend.


| | htp\_performance\_mode | 0, 1, 2, 3, 4, 5, 6, 7, 8 | 0 = Default | No | When performance\_mode is used, the delegate votes for the provided
performance level during inference and returns to a relaxed vote
after the inference has completed.


| | htp\_pd\_session | unsigned, signed | unsigned | No | This flag defines the PD session of the Hexagon Tensor Processor
backend. | | htp\_precision | 0 | 0 = Quantized precision | No | Flag to provide precision modes supported by the Hexagon Tensor
Processor backend. The default precision mode supports quantized
networks. Other precision modes may only be supported on certain
SoCs.


| | htp\_optimization\_strategy | 0, 1 | 0 = Optimize for inference | No | Flag to select the optimization strategy used by the Hexagon Tensor
Processor backend. The default optimization strategy optimizes the
graph for inference.


| | htp\_perf\_ctrl\_strategy | 0, 1 | 0 = Manual | No | Flag to select the Hexagon Tensor Processor performance control
strategy. Manually vote the performance while the backend is
initialized and release the performance at the moment the backend is
destroyed.


| | htp\_use\_conv\_hmx | 0, 1 | 1 = enable HMX for short depth conv2d | No | Flag to enable HMX for short depth conv2d. For more information, see
the C interface or qnn\_delegate.h.


| | htp\_use\_fold\_relu | 0,1 | 0 = do not fuse Relu into conv2d | No | Flag to enable fusion of Relu into conv2d. For more information, see
the C interface or qnn\_delegate.h.


| | library\_path | <Path to backend library file> | Default library associated with chosen Qualcomm AI Engine Direct
backend | No | Optional parameter to override the Qualcomm AI Engine Direct backend
library. | Last Published: Jul 12, 2024 [Previous Topic Run QNN delegate using the external delegate interface](https://docs.qualcomm.com/bundle/publicresource/80-70014-54/topics/run-qnn-delegate-using-the-external-delegate-interface.md) [Next Topic Optional: Build TensorFlow Lite Runtime](https://docs.qualcomm.com/bundle/publicresource/80-70014-54/topics/build-qualcomm-linux-and-install-tensorflow-lite-runtime.md)