Function: query_event

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Description

Queries whether the events recorded by acl.rt.record_event in the same thread as this API are executed.

This API will be deprecated in future releases. Use Function: query_event_status instead.

Prototype

  • C Prototype
    1
    aclError aclrtQueryEvent(aclrtEvent event, aclrtEventStatus *status)
    
  • Python Function
    1
    status, ret = acl.rt.query_event(event)
    

Parameters

Parameter

Description

event

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

Return Value

Return Value

Description

status

Int, pointer address of the event status.

  • 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.