[object Object]

This tutorial consists of three parts to help you quickly learn the basic usage of msProf for profile data collection and analysis:

  1. Environment setup: Install msProf and configure the operating environment.
  2. Collection: Use the msProf command-line tool to collect the first set of profile data.
  3. Analysis: Perform initial performance analysis and locate bottlenecks based on the generated result files.
[object Object]
  • Install the CANN Toolkit and ops operator packages. For details, see .

  • Set the environment variables.

    [object Object]
  • Run the following command to check whether the installation is successful:

    [object Object]
[object Object]
  1. Run the following command to start the training script and collect profile data by using the msProf tool. For details about the training script, see .

    [object Object]
    [object Object]

    If the following information is displayed, the execution is successful:

    [object Object]
  2. After the command is executed, the tool generates the [object Object] directory in the directory specified by [object Object]. This directory stores the automatically parsed profile data.

    [object Object]
[object Object][object Object]

You are advised to use the visualization tool to load the [object Object] folder and perform the following operations:

  • Locate time-consuming APIs, operators, and task flows
  • Analyze delivery relationships by using HostToDevice connection lines

[object Object]
[object Object]
[object Object][object Object]

The [object Object] file classifies data by operator type (Op Type). This file provides the total call duration and total number of calls for each operator type. The tool sorts the data by Total Time to identify the operator type with the longest duration. Use this information to analyze whether room for optimization exists for this operator type.

[object Object][object Object]

The [object Object] file contains detailed information about operators, such as the input and output shapes and the performance monitoring unit (PMU) data. The Task Duration field records the operator durations. You can sort operators by Task Duration to locate time-consuming operators. You can also sort them by Task Type to view the duration distribution on different cores (AI Core and AICPU) to identify time-consuming operators and analyze their optimization potential.

[object Object][object Object]

ResNet-50 Model Training Sample

[object Object]