Function: event_get_timestamp

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

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:

Prototype

  • C Prototype
    1
    aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp)
    
  • Python Function
    1
    timestamp, 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.