aclGetRecentErrMsg

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Obtains and clears the error messages returned by other failed acl API calls in the same process or thread.

The err_msg_mode configuration item in the aclInit API determines whether to obtain the process-level or thread-level error message. The thread-level error message is obtained by default.

You are advised to make a separate aclGetRecentErrMsg call upon each acl API call failure to facilitate troubleshooting. Otherwise, error messages may be stacked or lost. If aclGetRecentErrMsg has been called multiple times in a process or thread, only the error message string pointer returned by the most recent call is valid. Do not use those returned by the previous calls as this will result in unauthorized memory access.

Prototype

1
const char *aclGetRecentErrMsg()

Parameters

None

Returns

Success: a pointer to the error message string. If multiple error messages are obtained, the latest error message is displayed on the top.

Failure: nullptr

API Call Example

For the API call example, see Obtaining Runtime Error Codes.