Function: peek_at_last_error

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

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

√

Description

Obtains (but does not clear) the Runtime error code of the current thread.

Prototype

  • C Prototype
    1
    aclError aclrtPeekAtLastError(aclrtLastErrLevel level)
    
  • Python Function
    1
    ret = acl.rt.peek_at_last_error(level)
    

Parameters

Parameter

Description

level

Int, level of the error code to be obtained. Currently, only the thread level is supported. For details, see aclrtLastErrLevel.

Return Values

Return Value

Description

ret

Int, 0 on success; else, failure.