Function: reset_event

Applicability

Product

Supported (√/x)

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

Function Usage

Resets an event. Note that an event can be reset only after all requested tasks in the stream are complete. This API is asynchronous.

Prototype

  • C Prototype
    1
    aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream)
    
  • Python Function
    1
    ret = acl.rt.reset_event(event, stream)
    

Parameter Description

Parameter

Description

event

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

stream

Int, pointer address of the stream object where the event is located.

Return Value Description

Return Value

Description

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.
  • This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, call the synchronization API (for example, acl.rt.synchronize_stream) to ensure that the task is complete.