Function: stream_query

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

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)
    

Parameter Description

Parameter

Description

stream

Int, pointer address of the stream to be operated.

Return Value Description

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.