Function: create_event

C Prototype

aclError aclrtCreateEvent(aclrtEvent *event)

Python Function

event, ret = acl.rt.create_event()

Function Usage

Creates an event, which can be used to compute the elapsed time between two events and synchronize streams.

Input Description

None

Return Value

event: int, pointer address of the created event object.

ret: int, error code.

Restrictions

After an event is created by calling this API, the system applies for event resources only when the acl.rt.record_event API is called. Therefore, the number of events is limited. After the number of events reaches the upper limit, the system waits for resource release.

Limit on the number of events:

For the Atlas 200/300/500 Inference Product, a single device supports a maximum of 1023 events.

For the Atlas Training Series Product, a single device supports a maximum of 65535 events.