aclrtGetThreadIdFromExceptionInfo

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Function

Obtains the thread ID associated with an exception. This API must be used in pair with aclrtSetExceptionInfoCallback.

Prototype

1
uint32_t aclrtGetThreadIdFromExceptionInfo(const aclrtExceptionInfo *info)

Parameters

Parameter

Input/Output

Description

info

Input

Pointer to exception information.

If aclrtSetExceptionInfoCallback is called before task execution, the system records the task ID, stream ID, thread ID, and device ID associated with an exception in the aclrtExceptionInfo structure to facilitate troubleshooting.

Returns

Thread ID in the exception information. 0xFFFFFFFF (a hexadecimal example) indicates that the device is abnormal.