Profiling AI Tasks When They Are Running

Function

msprof supports profiling of AI tasks when they are running. After the profiling, it automatically parses the profile data and flush corresponding files to disks.

Command Format

Log in to the operating environment and run the following command in any directory:
msprof [options] <app>

app is mandatory. For details about the parameters, see app Parameters. For details about options, see Command-line Options.

Command-line Options

Example

Log in to the operating environment and run the following command in any directory:
msprof --output=/home/projects/output --ascendcl=on --runtime-api=on --task-time=on --aicpu=on --ai-core=on /home/projects/MyApp/out/main

In the Ascend EP scenario, the PROF_XXX directory is generated in the directory specified by --output to store the automatically parsed profile data. For details about the result files, see Profile Data File References.

In the Ascend RC scenario, the PROF_XXX directory is generated in the directory specified by --output. Since the files in this directory cannot be viewed without being parsed, you need to upload the PROF_XXX directory to the development environment for data parsing. For details, see Using the msprof Command to Parse, Query, and Export Profile Data.