Function: event_get_timestamp

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

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 Values

Return Value

Description

timestamp

Int, time when the event execution ends, in microseconds.

ret

Int, 0 on success; else, failure.