Function: get_overflow_status

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 overflow status of tasks on all streams in the current device and copies the status value to the device memory allocated by the user. This API is asynchronous.

Prototype

  • C Prototype
    1
    aclError aclrtGetOverflowStatus(void *outputAddr, size_t outputSize, aclrtStream stream)
    
  • Python Function
    1
    ret = acl.rt.get_overflow_status(outputAddr, outputSize, stream)
    

Parameter Description

Parameter

Description

outputAddr

Int, user-allocated device memory, which needs to be allocated by calling acl.rt.malloc. To view data on the host, call acl.rt.memcpy or acl.rt.memcpy_async to transfer data from the device to the host.

outputSize

Int, size of the device memory to be allocated, in bytes. The fixed size is 64 bytes.

stream

Int, pointer address of a stream to deliver an overflow status query task.

Return Value Description

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Restrictions

This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, call the synchronization API (for example, acl.rt.synchronize_stream) to ensure that the task is complete.

For the Atlas A2 training products/Atlas A2 inference products, the overflow status queried by calling this API is at the process level.

For the Atlas A3 training products/Atlas A3 inference products, the overflow status queried by calling this API is at the process level.