asc_mark_stamp
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
|
x |
Function Usage
Marks a specific position during operator execution by calling this API, facilitating subsequent analysis of code execution paths and performance hotspots through the pipeline chart.
Prototype
1 2 3 4 5 | template<pipe_t pipe = PIPE_S> __aicore__ inline void asc_mark_stamp(uint16_t idx) template<pipe_t pipe = PIPE_S, uint16_t idx> __aicore__ inline void asc_mark_stamp() |
Parameters
Parameter |
Description |
|---|---|
pipe |
Type of the pipeline where the stamp is located |
index |
Unique ID of the stamp set by the user |
Returns
None
Restrictions
- The value range of index is [0, 4095]. To easily find the corresponding code in the stamping diagram, you are advised not to use the same index repeatedly.
- If a MarkStamp instruction is added to a loop, a stamp is output each time the instruction is executed, and the index is the same.
- If you add stamps to two adjacent VFs, MarkStamp1 and MarkStamp2 will be optimized and no stamp will be output because the compiler may fuse VF A and VF B.
Examples
mte2_opt(); mte1_opt(); // Stamping at the beginning of operator execution. asc_mark_stamp<CUBE, 0>(); // Performing core computation. cube_opt(); // Stamping at the end of operator execution. asc_mark_stamp<CUBE, 1>(); mte3_opt();
Parent topic: Commissioning APIs