Function: stream_query

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 Value

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.