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.

  1. 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.
  2. 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.
    Figure 1 Viewing the time consumed by the executed kernel

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.

  1. 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.
  2. On the ModuleCompare sheet, search for the deteriorated operators in the top modules with the largest time difference.
  3. Search for the target code line by calling the stack, as shown in Figure 2.
    Figure 2 Searching for a code line