There are a number of --profile options
for enabling profiling of the application and kernel events during runtime execution.
See
Enabling
Profiling in Your Application in the Data Center Acceleration using
Vitis (UG1700) for more
details.
Profile options capture transaction details for kernel–host data traffic, kernel stalls, and execution times for kernels and compute units. The options also enable monitoring activity in Versal AI Engines.
--profile option in v++ also requires the addition of one of the profile or trace options in
the xrt.ini file. Refer to xrt.ini File for more information.--profile commands in a
configuration file under the [profile] section head
using the following format. [profile]
data=all:all:all # Monitor data on all kernels and CUs
data=k1:all:all # Monitor data on all instances of kernel k1
data=k1:cu2:port3 # Specific CU master
data=k1:cu2:port3:counters # Specific CU master (counters only, no trace)
memory=all # Monitor transfers for all memories
memory=<sptag> # Monitor transfers for the specified memory
stall=all:all # Monitor stalls for all CUs of all kernels
stall=k1:cu2 # Stalls only for cu2
exec=all:all # Monitor execution times for all CUs
exec=k1:cu2 # Execution tims only for cu2
aie=all # Monitor all AIE streams
aie=DataIn1 # Monitor the specific input stream in the SDF graph
aie=M02_AXIS # Monitor specific stream interface
See the various options of the command below.
--profile.aie:<arg>
Enables profiling of AI Engine
streams in adaptive data flow (ADF) applications, where <arg> is:
<ADF_graph_argument|pin name|all>
-
<ADF_graph_argument>: Specifies an argument name from the ADF graph application. -
<pin_name>: Indicates a port on an AI Engine kernel. -
<all>: Indicates monitoring all stream connections in the ADF application.
DataIn1 input stream use the following
command:v++ --link --profile.aie:DataIn1
--profile.aie_trace_offload:<arg>
Enables profiling of AI Engine
streams in adaptive data flow (ADF) applications, where <arg> is HSDP, or high-speed debug port.
v++ --link --profile.aie_trace_offload:HSDP
See the Event Trace Offload using High Speed Debug Port in AI Engine Tools and Flows User Guide (UG1076) for details on the use of HSDP.
--profile.data:<arg>
Enables monitoring of data ports you add to the design via monitor IP. Specify this option during linking.
Where <arg> is:
[<kernel_name>|all]:[<cu_name>|all]:[<interface_name>|all](:[counters|all])
-
[<kernel_name>|all]defines a specific kernel to apply the command to. You can also specify the keywordallto apply the monitoring to all existing kernels, compute units, and interfaces with a single option. -
When you specify
<kernel_name>, you can target a specific compute unit with<cu_name>or apply the command to all compute units. -
[<interface_name>|all]defines the specific interface on the kernel or CU to monitor for data activity, or monitor all interfaces. -
[<counters|all]is an optional argument, as it defaults toallwhen not specified. It allows restricting the information gathering to onlycountersfor larger designs, whileallwill include the collection of actual trace information.
For example, to assign the data profile to all CUs and interfaces
of kernel k1 use the following command:
v++ --link --profile.data k1:all:all
--profile.exec:<arg>
This option records the execution times of the kernel and provides minimum port data collection during the system run. This option needs to be specified during linking.
--profile.data or --profile.stall
is specified. You can specify --profile.exec for
any CUs not covered by data or stall.The syntax for exec profiling
is:
[<kernel_name>|all]:[<cu_name>|all](:[counters|all])
For example, to profile to execution of cu2 for kernel k1 use the following
command:
v++ --link --profile.exec:k1:cu2
--profile.stall:<arg>
v++ compilation and linking. Adds stall monitoring logic to the device binary (.xclbin). Requires the addition of stall ports on
the kernel interface. You must specify the stall
option during both compilation and linking.
The syntax for stall profiling
is:
[<kernel_name>|all]:[<cu_name>|all](:[counters|all])
For example, to monitor stalls of cu2 for kernel k1 use the following
command:
v++ --compile -k k1 --profile.stall ...
v++ --link --profile.stall:k1:cu2 ...
--profile.trace_memory:<arg>
-t=hw) only. You do not need to use this
for software or hardware emulation flows. When building the hardware target (-t=hw), use this option to specify the type and amount of memory to
use for capturing trace data. You can specify the argument as follows:
<FIFO>:<size>|<MEMORY>[<n>][:<SLR>]
This argument specifies memory type to use for capturing trace
data. Use the --profile.trace_memory command to
define the type or memory to use, with the trace_buffer_size switch in the xrt.ini file to define the amount of memory to use as described in
xrt.ini File. The default memory type
used is the first memory defined in the platform, and the default buffer size is 1
MB.
When you enable device_trace without trace_memory,
the tool captures profile data in default platform memory and allocates a 1 MB trace
buffer.
- FIFO:<size>
- Specified in KB. The maximum is 128K, although 64K is the maximum recommended.
- Memory
- Specifies the type and number of memory resource on the platform. You can
identify memory resources for the target platform with the
platforminfocommand. Supported memory types include HBM, DDR, PLRAM, HP, ACP, MIG, and MC_NOC. For example,DDR[1]. - [:<SLR>]
- Optional. Indicates that CUs you assign to the
<SLR>need to use the DDR or HBM resources in the<MEMORY>field. You can only use this syntax with DDR or HBM memory banks.
You can specify the --profile.trace_memory command with the memory size and unit such as
FIFO:8k, or specify the memory bank such as
DDR[0] or HBM[3]. In this case, Vitis captures the profile data
for all CUs in the specified memory.
You can also specify the memory to use to capture profile data, and the SLR assignment for that memory. In this case, the SLR assignment indicates that any CUs assigned to the specified SLR need to have profile data captured in the specified memory. See the following example.
[profile]
trace_memory=DDR[1]:SLR0
trace_memory=DDR[2]:SLR1
The example captures profile data for CUs on SLR0 in DDR bank 1 and for CUs
on SLR1 in DDR bank 2. Use the --connectivity.slr command to assign
compute units to SLRs, as described in
Assigning Compute
Units to SLRs on Alveo Accelerator Cards in
the Data Center Acceleration using
Vitis (UG1700).
<SLR> syntax, you must use that
syntax for all trace_memory commands in the
design.