aclrtQueryEventStatus

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Queries the execution status of all tasks captured in an event. For more details, see aclrtRecordEvent.

Prototype

aclError aclrtQueryEventStatus(aclrtEvent event, aclrtEventRecordedStatus *status)

Parameters

Parameter

Input/Output

Description

event

Input

Event to query.

status

Output

Pointer to the event status.

If all tasks captured in the event are completed, ACL_EVENT_RECORDED_STATUS_COMPLETE is returned. If any task is not completed, ACL_EVENT_RECORDED_STATUS_NOT_READY is returned.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

If aclrtRecordEvent and aclrtQueryEventStatus are called on different threads, the execution time of the two APIs may be out of order. As a result, the completion status of the queried event object does not meet the expectation.