TRACE_STOP

Function Usage

Performs logging in any running phase of the operator when the CAModel is used for operator performance simulation. This helps to analyze the pipelines of different instructions for further performance optimization.

Indicates logging at the end point. This API is used together with TRACE_START.

Prototype

#define TRACE_STOP(apid)

Parameters

Parameter

Input/Output

Description

apid

Input

The value must be the same as that of TRACE_START. Otherwise, the logging result is affected.

Returns

None

Availability

This macro supports all product models. However, the actual product models must be the same as those supported by the debugging tool.

Precautions

  • TRACE_START and TRACE_STOP must be used together. If no log is displayed on the trace chart, they are not paired.
  • This API cannot be used across cores. For example, if TRACE_START is logged in the AI Cube, TRACE_STOP must also be recorded in the AI Cube instead of the AI Vector.

Example

Add TRACE_START and TRACE_STOP to the specific instruction position in the kernel code.

TRACE_START(0x1);
DataCopy(zGm, zLocal, this->totalLength);
TRACE_STOP(0x1);