Memory Tile Event Trace for AI Engine-ML-based Devices - 2023.2 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2023-12-04
Version
2023.2 English

Trace data can be captured from Memory Tiles using Xilinx Runtime (XRT) and Xilinx Software Debugger (XSDB) the same way it can be done for AI Engine Tiles, AI Engine Memory, and AI Engine Interface. These options are specific to the AI Engine-ML.

The channels metric set focuses on the start and end of buffer descriptors while the other metric sets add stalls to trace.

Table 1. Memory Tile Event Trace
Event Type / Metric Set input_channels input_channels_stalls output_channels output_channels_stalls
S2MM channel buffer descriptors transfers Yes 2x Yes - -
S2MM channel lock stalls - Yes - -
S2MM channel stream starvation - Yes - -
S2MM channel memory backpressure - Yes - -
MM2S channel buffer descriptors transfers - - Yes 2x Yes
MM2S channel lock stalls - - - Yes
MM2S channel stream backpressure - - - Yes
MM2S channel memory starvation - - - Yes
Table 2. XSDB Trace Options
Option Description
-tile-based-memory-tile-metrics Sets which AI Engine-ML Memory Tile event to store for specified tiles.
-graph-based-memory-tile-metrics Sets which AI Engine-ML Memory Tile event to store for specified buffers/graph.

Here are some examples of event tracing for Memory Tiles using a XSDB flow:

# Sets event trace to "input_channels" for the buffer named buffer2 of graph1 (channels 1 and 2) and "input_channels_stalls" for buffer4 in graph3 for channles 3 and 4.
-graph-based-memory-tile-metrics "graph1:buffer2:input_channels:1:2; graph3:buffer4:input_channels_stalls:3:4" 

# Sets event trace to "output_channels" for columns 1 to 4 only for channel 1 and 2, and "output_channels_stalls" for column 5 and channels 3 and 4.
-tile-based-memory-tile-metrics "1:4:output_channels:1:2; 5:output_channels_stalls:3:4"
Table 3. XRT Flow Trace Options for Memory Tiles
Option Description
tile_based_memory_tile_metrics = <column|all>:<off|channels|input_channels_stalls|output_channels_stalls>[:<channel 1>][:<channel 2>] Configures the AI Engine Memory Tile event trace metric to be applied for a single column or all columns.
tile_based_memory_tile_metrics =<mincolumn> <maxcolumn>:<off|input_channels|input_channels_stalls|output_channels|output_channels_stalls>[:<channel 1>][:<channel 2>] Configures the AI Engine Memory Tile event trace metric to be applied for all columns in a range.
graph_based_memory_tile_metrics = <graph name|all>:<buffer name|all>:<off|input_channels|input_channels_stalls|output_channels|output_channels_stalls>[:<channel 1>][:<channel 2>] Configures the AI Engine Memory Tile event trace metric to be applied for one or all buffers in a specific or all graphs.

Following are some xrt.ini file examples:

# Sets event trace to "input_channels" for the buffer named buffer2 of graph1 (channels 1 and 2) and "input_channels_stalls" for buffer4 in graph3 for channles 3 and 4.
graph-based-memory-tile-metrics=graph1:buffer2:input_channels:1:2; graph3:buffer4:input_channels_stalls:3:4 

# Sets event trace to "output_channels" for columns 1 to 4 only for channel 1 and 2, and "output_channels_stalls" for column 5 and channels 3 and 4.
tile-based-memory-tile-metrics=1:4:output_channels:1:2; 5:output_channels_stalls:3:4