Function: event_get_timestamp
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 together with other key APIs. The API call sequence is as follows:
- Call the acl.rt.create_event or acl.rt.create_event_with_flag API to create an event.
- Call the acl.rt.record_event API to record the event in the stream.
- Call the acl.rt.synchronize_stream API to block the running of the application until all tasks in the specified stream are complete.
- Call acl.rt.event_get_timestamp to obtain the execution time of the event.
Prototype
- C Prototype
1aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp)
- Python Function
1timestamp, ret = acl.rt.event_get_timestamp(event)
Parameters
Parameter |
Description |
|---|---|
event |
Int, event to be queried. |
Return Value
Return Value |
Description |
|---|---|
timestamp |
Int, time when the event execution ends, in microseconds. |
ret |
Int, 0 on success; else, failure. |
Parent topic: Event Management