Function: stream_query

C Prototype

aclError aclrtStreamQuery(aclrtStream stream, aclrtStreamStatus *status)

Python Function

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

Function Usage

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

Input Description

stream: int, pointer address of the stream to be operated.

Return Value

status: task status on the stream. For details, see aclrtStreamStatus.

ret: int, error code.

Restrictions

This API can be used in the following scenarios:

  • The Atlas 200/300/500 Inference Product uses this API to query the execution status of a task.