Function: get_stream_id_from_exception_info

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Obtains the stream ID associated with an exception. This API must be used in pair with acl.rt.set_exception_info_callback.

Prototype

  • C Prototype
    1
    uint32_t aclrtGetStreamIdFromExceptionInfo(const aclrtExceptionInfo *info)
    
  • Python Function
    1
    stream_id = acl.rt.get_stream_id_from_exception_info(info)
    

Parameter Description

Parameter

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 Description

Return Value

Description

stream_id

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

Reference

For the API call example, see AI Core Troubleshooting.