Function: get_thread_id_from_exception_info

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Function

Obtains the thread ID associated with an exception. This interface is used together with the acl.rt.set_exception_info_callback interface.

Prototype

  • C Prototype
    1
    uint32_t aclrtGetThreadIdFromExceptionInfo(const aclrtExceptionInfo *info)
    
  • Python Function
    1
    thread_id = acl.rt.get_thread_id_from_exception_info(info)
    

Parameters

Parameter

Description

info

Int, pointer address of the exception information aclrtExceptionInfo.

If the acl.rt.set_exception_info_callback API is called before a task is executed, the system stores the abnormal task ID, stream ID, thread ID, and device ID in aclExceptionInfo.

Return Value

Returned Value

Description

thread_id

Int, thread ID in the exception information. 0xFFFFFFFF (hexadecimal) indicates that the exception information is empty.