aclrtGetDeviceIdFromExceptionInfo

Description

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

Prototype

uint32_t aclrtGetDeviceIdFromExceptionInfo(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 aclExceptionInfo struct to facilitate troubleshooting.

Returns

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

See Also

For the API call example, see AI Core Troubleshooting.