Function: destroy_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

Destroys an event. This API can be called to destroy an event before the event is complete. In this case, this API does not block the thread until the event is complete. Event-related resources are automatically released when the event is complete.

Prototype

  • C Prototype
    1
    aclError aclrtDestroyEvent(aclrtEvent event)
    
  • Python Function
    1
    ret = acl.rt.destroy_event(event)
    

Parameters

Parameter

Description

event

Int, pointer address of the event to be destroyed.

Return Value

Return Value

Description

ret

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

Restrictions

When calling the acl.rt.destroy_event API to destroy an event, ensure that the event is not being used by other APIs.