Function QnnBackend_registerOpPackage

Function Documentation

Qnn_ErrorHandle_t QnnBackend_registerOpPackage(Qnn_BackendHandle_t backend, const char *packagePath, const char *interfaceProvider, const char *target)

Register an operation package with the backend handle.

Parameters
  • backend[in] A backend handle.

  • packagePath[in] Path on disk to the op package library to load.

  • interfaceProvider[in] The name of a function in the op package library which satisfies the QnnOpPackage_InterfaceProvider_t interface. The backend will use this function to retrieve the op package’s interface.

  • target[in] An optional parameter specifying the target platform on which the backend must register the op package. Required in scenarios where an op package is to be loaded on a processing unit that is different from the target on which the backend runs. Ex: loading a DSP op package on ARM for optional online context caching. Refer to additional documentation for a list of permissible target names.

Returns

Error code:

  • QNN_SUCCESS: No error encountered

  • QNN_BACKEND_ERROR_INVALID_ARGUMENT: if packagePath or interfaceProvider is NULL

  • QNN_BACKEND_ERROR_OP_PACKAGE_NOT_FOUND: Could not open packagePath

  • QNN_BACKEND_ERROR_OP_PACKAGE_IF_PROVIDER_NOT_FOUND: Could not find interfaceProvider symbol in package library

  • QNN_BACKEND_ERROR_OP_PACKAGE_REGISTRATION_FAILED: Op package registration failed

  • QNN_BACKEND_ERROR_OP_PACKAGE_UNSUPPORTED_VERSION: Op package has interface version not supported by this backend

  • QNN_BACKEND_ERROR_NOT_SUPPORTED: Op package registration is not supported.

  • QNN_BACKEND_ERROR_INVALID_HANDLE: backend is not a valid handle

  • QNN_BACKEND_ERROR_OP_PACKAGE_DUPLICATE: OpPackageName+OpName must be unique. Op package content information can be be obtained with QnnOpPackage interface. Indicates that an Op with the same package name and op name was already registered.

  • QNN_COMMON_ERROR_SYSTEM_COMMUNICATION: SSR occurence (successful recovery)

  • QNN_COMMON_ERROR_SYSTEM_COMMUNICATION_FATAL: SSR occurence (unsuccessful recovery)

Note

Use corresponding API through QnnInterface_t.