Function: stream_query

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

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

Prototype

  • C Prototype
    1
    aclError aclrtStreamQuery(aclrtStream stream, aclrtStreamStatus *status)
    
  • Python Function
    1
    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. 0 on success; else, failure.

Restrictions

This API can be used in the following scenarios:

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