Function: range_start

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

Records the start time of the time span by msproftx when an event occurs.

After this API is called, the Profiling tool automatically records the start timestamp in stamp and sets the event type to Start or Stop. The tool also generates a unique process ID, and saves the stamp in a map maintained by process.

Prototype

  • C Prototype
    1
    aclError aclprofRangeStart(void *stamp, uint32_t *rangeId)
    
  • Python Function
    1
    range_id, ret = acl.prof.range_start(stamp)
    

Parameters

Parameter

Description

stamp

Int, stamp pointer address, indicating the msproftx event stamp. This specifies the pointer to the Function: create_stamp API.

Return Values

Return Value

Description

range_id

Int, unique ID of a msproftx event stamp. Used to distinguish between threads.

ret

Int, error code.

  • 0 indicates success.
  • Other values indicate failure.

Restrictions