runModelInference
Run the inference of an algorithm model provided in binary package.
This API supports both QNN context binaries and TensorFlow Lite FlatBuffer models. The binary format stored in modelBinary must match the selected modelType:
ModelInferenceType.QNN_HTP: QNN Context Binary for the HTP backend.
ModelInferenceType.LITE_RT_CPU: TensorFlow Lite FlatBuffer model executed on CPU.
ModelInferenceType.LITE_RT_GPU: TensorFlow Lite FlatBuffer model executed on GPU.
ModelInferenceType.LITE_RT_NPU: TensorFlow Lite FlatBuffer model executed on NPU.
Existing calls that use ModelInferenceType.QNN_HTP keep their original behavior and do not require any code changes.
Parameters
the name tag for the algorithm binary package.
the type of the algorithm model.
the shared memory which stored the algorithm binary package. The binary package's format must match the modelType.
the descriptions and tensor association of inputs to the selected model when it is executed. You can use this array to select which computation graph nodes will accept data from pipeline tensors.
the descriptions and tensor association of outputs from the selected model after execution. You can use this array to select from which computation graph nodes you would like to read values into pipeline tensors.