Operator Code Hot Spot Map

The visualize_data.bin file generated by msprof op simulator can be visually inspected via MindStudio Insight. The interface displays the mapping between operator source code and instruction sets, along with their time consumption, aiding in identifying hotspot code distribution and assessing the feasibility of optimizing these functions.

  • To use MindStudio Insight, you need to install the MindStudio Insight software package. For details about the download link, see Installation and Uninstallation.
  • For details about how to import the visualize_data.bin file to MindStudio Insight, see Importing Profile Data.
  • For details about the operations and fields of MindStudio Insight, see Source.
  • If the -g compilation option is added, the generated binary file contains debugging information. You are advised to restrict the access permission of user programs with debugging information to ensure that only authorized personnel can access the binary file.
  • If the functions provided by the llvm-symbolizer component are not used, do not include -g when compiling the program that is input to msProf. In this case, the msProf tool does not invoke the functions of the llvm-symbolizer component.
Figure 1 msprof op simulator source code page
  • On the top of the page, you can switch between compute units and kernel function files.
  • On the left of the page, you can view the time consumed and the number of instructions for each line of the operator kernel function code, which can help you quickly identify code bottlenecks.
  • On the right of the page, you can see the instruction execution duration, the number of executions, and the associated code, which can help you further analyze the reasons behind prolonged code execution times.