Profiling is a form of dynamic program analysis. You can use profiling to measure the following:
- Input/output throughput
- Space (memory)
- Time complexity of a program
- Usage of specific instructions
- Frequency and duration of function calls
Most commonly, profiling information serves to aid program optimization, and more specifically, performance tuning.
You can obtain profiling data when you run your design in simulation or in hardware at runtime. Analyzing profiling data helps you to do the following:
- Gauge the efficiency of the kernels
- Determine the stall and active times associated with each AI Engine
- Pinpoint the AI Engine kernel whose performance might not be optimal.
Profiling also allows you to collect data on design latency, throughput, and bandwidth by using runtime event APIs in your PS host code.
You have two options for gathering this information:
- Use performance counters built into the hardware to monitor AI Engine and memory module events. You can use this feature in hardware and hardware emulation.
- Use event APIs to profile the AI Engine graph inputs and outputs from the graph host application. You can use this feature in simulation and hardware flows.