Function: query_event_wait_status

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 whether the tasks awaiting in an event are completed after acl.stream_wait_event call.

Prototype

  • C Prototype
    1
    aclError aclrtQueryEventWaitStatus(aclrtEvent event, aclrtEventWaitStatus *status)
    
  • Python Function
    1
    status, ret = acl.rt.query_event_wait_status(event)
    

Parameters

Parameter

Description

event

Int, pointer address of the event object to be queried.

Return Values

Return Value

Description

status

Int, pointer address of the event status. For details, see aclrtEventWaitStatus.

  • ACL_EVENT_RECORDED_STATUS_NOT_READY = 0: The event is not recorded in the stream, or the event recorded in the stream is not executed or fails to be executed.
  • ACL_EVENT_RECORDED_STATUS_COMPLETE = 1: The event recorded in the stream is successfully executed.

ret

Int, error code. 0 on success; else, failure.

Restrictions

Events created by calling acl.rt.create_event_ex_with_flag cannot use this API.