Function: get_device_id_from_exception_info
|
C Prototype |
uint32_t aclrtGetDeviceIdFromExceptionInfo(const aclrtExceptionInfo *info) |
|---|---|
|
Python Function |
device_id = acl.rt.get_device_id_from_exception_info(info) |
|
Function Usage |
Obtains the device ID associated with an exception. |
|
Input Description |
info: int, pointer address of the exception information aclrtExceptionInfo. If acl.rt.set_exception_info_callback is called before task execution, the system records the task ID, stream ID, thread ID, and device ID associated with an exception in aclExceptionInfo to facilitate troubleshooting. |
|
Return Value |
device_id: int, device ID in the exception information. 0xFFFFFFFF (hexadecimal) indicates that the exception information is empty. |
|
Restrictions |
None |
|
Reference |
For details about the API call example, see AI Core Troubleshooting. |