aclrtCreateEvent
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Creates an event, which can be used to compute the elapsed time between two events and synchronize streams.
Prototype
aclError aclrtCreateEvent(aclrtEvent *event)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
event |
Output |
Event pointer. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
- Events created with this API cannot be used in the aclrtResetEvent API. Otherwise, undefined behavior may occur.
- After an event is created by calling this API, the system applies for event resources only when the aclrtRecordEvent 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.
The number of events supported varies depending on the hardware model, as shown in the following table.
Model
Maximum Number of Events Supported by a Device
Atlas inference products 1,023
Atlas training products 65,535
Atlas A3 training products /Atlas A3 inference products Atlas A2 training products /Atlas A2 inference products Atlas 200I/500 A2 inference products 65536