Function: stream_query

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Queries the execution status of all tasks on a specified stream.

Prototype

  • C Prototype

    aclError aclrtStreamQuery(aclrtStream stream, aclrtStreamStatus *status)
    
  • Python Function

    status, ret = acl.rt.stream_query(stream)
    

Parameters

Parameter Description
stream Int, pointer address of the stream to be operated.

Return Values

Return Value Description
status Task status on the stream. For details, see aclrtStreamStatus.
ret Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails.

Constraints

This API can be used to query the task execution status in the Ascend Virtual Instance (AVI) scenario.