Function QnnLog_create¶
Defined in File QnnLog.h
Function Documentation¶
-
Qnn_ErrorHandle_t QnnLog_create(QnnLog_Callback_t callback, QnnLog_Level_t maxLogLevel, Qnn_LogHandle_t *logger)¶
Create a handle to a logger object. This function can be called before QnnBackend_create().
- Parameters
callback – [in] Callback to handle backend-generated logging messages. NULL indicates backend may direct log messages to the default log stream on the target platform when possible (e.g. to logcat in case of Android).
maxLogLevel – [in] Maximum level of messages which the backend will generate.
logger – [out] The created log handle.
- Returns
Error code:
QNN_SUCCESS: if logging is successfully initialized.
QNN_COMMON_ERROR_NOT_SUPPORTED: logging is not supported.
QNN_LOG_ERROR_INVALID_ARGUMENT: if one or more arguments is invalid.
QNN_LOG_ERROR_MEM_ALLOC: for memory allocation errors.
QNN_LOG_ERROR_INITIALIZATION: log init failed.
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.
Warning
With different logging level enabled, the inference time may vary.