UDF Error Codes

flowfunc

flow_func_defines.h provides FlowFunc error codes for you to process abnormal logic. The meanings of error codes are as follows.

Error Code

Description

Solution

FLOW_FUNC_SUCCESS = 0

Execution success

N/A

FLOW_FUNC_ERR_PARAM_INVALID = 164000

Invalid parameters

This error code is returned when parameter verification fails. A possible cause is that the input parameter is out of the range supported by the system or some parameters are not matched. When this error code is returned, invalid parameters and error causes are recorded in logs. Locate the fault based on the logs.

FLOW_FUNC_ERR_ATTR_NOT_EXITS = 164001

Target attribute not found

Check the name of the attribute to be obtained, and check whether the attribute is set before it is obtained.

FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH = 164002

Attribute type mismatch during attribute obtaining

Check whether the data type of the attribute value matching the input attribute name is consistent with the data type of the output variable when the GetAttr API is called. When this error code is triggered, the error log prints the actual data type of the attribute corresponding to the attribute name.

FLOW_FUNC_FAILED = 564000

UDF internal error code

Troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

FLOW_FUNC_ERR_DATA_ALIGN_FAILED = 364000

Data alignment failure

Possible causes:

  • The FlowFunc implementation is incorrect. For example, the given input does not match.
  • The execution of a node times out. As a result, the data alignment waiting times out.

FLOW_FUNC_ERR_TIME_OUT_ERROR = 564001

NN execution timeout

Check the logs for other errors causing model execution failures. If any such errors exist, troubleshoot based on the actual error details. If no error logs are present and the model shows normal execution, adjust the timeout input parameter passed to the data fetch API: either increase its value or set it to -1 directly.

FLOW_FUNC_ERR_NOT_SUPPORT = 564002

Function not supported

Possible causes:

  • This function is not supported by the single-func API. Replace the single-func API with a multi-func API to avoid this error.
  • The corresponding API is not implemented. For example, if ResetFlowFuncState is not implemented in the fault recovery scenario, a message is returned by default, indicating that the function is not supported.

FLOW_FUNC_STATUS_REDEPLOYING = 564003

Downgraded deployment in progress

A recoverable error triggers downgraded deployment. As a result, no data can be obtained. After the downgraded deployment is complete, other return codes are returned. If the downgraded deployment is successful, data is returned. Otherwise, other unrecoverable error codes are returned.

FLOW_FUNC_STATUS_EXIT = 564004

UDF process exit in progress

This error code is returned if the process receives an exit signal when FlowFunc is waiting for input data, indicating that the process is about to exit and stop input data preparation. Troubleshoot the root cause of the exit signal received by the UDF process based on logs.

FLOW_FUNC_ERR_DRV_ERROR = 564100

Common driver error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

FLOW_FUNC_ERR_MEM_BUF_ERROR = 564101

Driver memory buffer API error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

FLOW_FUNC_ERR_QUEUE_ERROR = 564102

Driver queue API error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

FLOW_FUNC_ERR_EVENT_ERROR = 564103

Driver event API error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

FLOW_FUNC_ERR_USER_DEFINE_START = 9900000

User-defined error code, starting from the current error code

-

FLOW_FUNC_ERR_USER_DEFINE_END = 9999999

User-defined error code, ending with the current error code

-

AI CPU

When executing a model, the AI CPU may report the following error codes to users.

Error Code

Description

Solution

int32_t AICPU_SCHEDULE_ERROR_PARAMETER_NOT_VALID = 521001

Invalid parameters

This error code is returned when parameter verification fails. A possible cause is that the input parameter is out of the range supported by the system or some parameters are not matched. When this error code is returned, invalid parameters and error causes are recorded in logs. Locate the fault based on the logs.

int32_t AICPU_SCHEDULE_ERROR_FROM_DRV = 521003

Driver API error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_NOT_FOUND_LOGICAL_TASK = 521005

Target AI CPU task not found

Check whether the version of the environment driver package is compatible with that of the CANN package. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_INNER_ERROR = 521008

AI CPU internal error

Check whether the version of the environment driver package is compatible with that of the CANN package. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_OVERFLOW = 521011

Overflow

Overflow occurs in the multiplication or addition operation. Locate the fault based on the specific log.

int32_t AICPU_SCHEDULE_ERROR_MODEL_EXIT_ERR = 521104

Model execution failure

During model execution, the return value is set to an exception flag. As a result, the model cannot be executed. Check logs for other errors and troubleshoot the root cause with specific log details.

int32_t AICPU_SCHEDULE_ERROR_MODEL_EXECUTE_FAILED = 521106

Model execution failure reported by the TSCH during model execution

An abnormal termination message is received during model execution, requiring the model to terminate (the termination cause is model stream execution failure). Check logs for other errors and troubleshoot the root cause with specific log details.

int32_t AICPU_SCHEDULE_ERROR_TSCH_OTHER_ERROR = 521107

Other errors reported by the TSCH during model execution

An abnormal termination message is received during model execution, requiring the model to terminate. Check logs for other errors and troubleshoot the root cause with specific log details.

int32_t AICPU_SCHEDULE_ERROR_DISCARD_DATA = 521108

Mbuf data discarded during model execution

Cached Mbuf data exceeds the threshold during model execution, leading to Mbuf data discard. To address this issue, adjust the cache quantity or time threshold for Mbufs.

int32_t AICPU_SCHEDULE_ERROR_DRV_ERR = 521206

Driver API error

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_MALLOC_MEM_FAIL_THROUGH_DRV = 521207

Failed to allocate memory via the driver API

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, check whether the device memory usage reaches the upper limit. Troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_SAFE_FUNCTION_ERR = 521208

Secure function (such as memcpy_s) execution failure

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_INVAILD_EVENT_SUBMIT = 521209

AI CPU event submission failure

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.

int32_t AICPU_SCHEDULE_ERROR_CALL_HCCL = 521500

Failed to call the HCCL API from the AI CPU

Check whether the environment driver package is properly installed and whether the device status is normal. If the current environment installation package meets the expectation and the environment status is normal, troubleshoot the issue by analyzing logs, or contact engineers for handling. (After obtaining the logs, click here to contact technical support.)

For details about logs, see Log Reference.