Comparing and Analyzing the Operator Performance Deterioration
Comparing the Operator-level Performance
The msprof-analyze compare tool provides comparison about the operator-level performance. The result is displayed on the "OperatorCompare" and "OperatorCompareStatistic" sheets in the performance_comparison_result_{timestamp}.xlsx. The result displays the comprehensive shape information, time consumed by the delivered kernel and device, and memory usage.
- Check the OperatorCompareStatistic sheet, which displays the number of operator calls and the total time consumed by the device. Sort the operators in reverse order by Diff Duration(ms) or Diff Ratio, and find the top operators with the largest time difference.
- On the "OperatorCompare" sheet, search for the top operators with the largest time difference and view the time consumed by the executed kernel, as shown in Figure 1, to find the optimization points.
Comparing the Module-level Performance
The msprof-analyze compare tool also supports module-level comparison, helping quickly identify deteriorated modules and operators and locate code blocks.
- On the ModuleCompareStatistic sheet, set Operator Name to [TOTAL], sort the modules by Device Self Time (ms) in reverse order, and find the modules with the largest time difference.
- On the ModuleCompare sheet, search for the deteriorated operators in the top modules with the largest time difference.
- Search for the target code line by calling the stack, as shown in Figure 2.

