aclrtEventGetTimestamp
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the execution end time of an event (time elapsed since the AI processor system is started).
This API must be used with other key APIs. The API call sequence is as follows: Call aclrtCreateEvent or aclrtCreateEventWithFlag to create an event --> Call aclrtRecordEvent to record the event in a stream --> Call aclrtSynchronizeStream to wait until the stream tasks are completed --> Call aclrtEventGetTimestamp to obtain the event execution time.
Prototype
1 | aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
event |
Input |
Event to query. For details about the type definition, see aclrtEvent. |
timestamp |
Output |
Time when the event execution ends, in microseconds. |
Returns
0 on success; else, failure. For details, see aclError.