Enabling No Overhead Profiling - 2021.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-03-29
Version
2021.2 English

When profiling is enabled in xrt.ini with opencl_summary or native_xrt_trace, there is operational overhead added and events in the timeline can show longer delay in between events. However, XRT provides an option to dump just the OpenCL events on the timeline trace without any overhead from profiling. It is a simple method of displaying events on the timeline without any overhead.

Because the goal is to provide visibility into events with absolutely zero overhead, there are limitations to the number of events that can be logged. Additionally, there is no command queue information in this view, so this view is not a replacement of the Timeline Trace; just an alternative view.

You can use the "no overhead" view to confirm OpenCL command dependencies and to observe actual event overhead for the command execution from the host application.

Add the following switch in xrt.ini to enable OpenCL events. The beginning and end of event capturing can be controlled as shown below:
[Debug]
xocl_debug=true
#xocl_event_begin= 0 (default)
#xocl_event_end=1000 (default)

By default only 1000 events can be visualized. OpenCL commands can be visualized on the same timeline. This feature should not be used with opencl_trace enabled, but can be used with device profile enabled.

After the run, use the following steps to generate a .wdb file to view in Vitis Analyzer:
vp_analyze xocl -i xocl.log // generates debug_log.csv
vp_analyze trace -i debug_log.csv // generates debug_log.wdb
vitis_analyzer debug_log.wdb // loads the wdb file in Vitis analyzer
Figure 1. No Overhead Timeline

Generally "no overhead" profiling should be disabled with regular or low-overhead profiling, as the more detailed profiling will add overhead in any case.

Table 1. Options for OpenCL Profiling
Trace Information Captured Profile Overhead Use Case xrt.ini Switches
Complete High For debug purposes like the early stage of application development. opencl_summary = true

opencl_trace = true

Partial Low When profile overhead is High and unexpected delay is experienced. lop_trace = true
Minimum No Only to confirm the cause of delay between events. xocl_debug = true