Collecting Profile Data In a Delayed Mode

When using the msprof CLI for profile data sampling, you can use the delay and duration parameters described in this section to configure the collection duration and the collection delay function.

Dynamically Collecting Profile Data is not supported in the delay sampling scenarios.

Availability

Atlas Training Series Product

Prerequisites

  • Ensure that an AI project can run properly in the operating environment.
  • Ensure that operations in Before You Start have been completed.

Command Example

Log in to the environment where the Ascend-CANN-Toolkit is located as the running user, and run the following command to collect profile data:

msprof --delay=3 --duration=3 /home/projects/MyApp/out/main

Delayed data collection is supported only when AI job runtime profile data collection is enabled, and it requires the passing of a user application. This option cannot be configured together with --dynamic.

Command-line Options

Table 1 Command-line options

Option

Description

Required/Optional

--delay

Delay for profile data collection. The value range is [1, 4294967295], in seconds. The default value is 0. If the configured time exceeds the execution time of an AI job, the collection will not be started during the execution of the AI job.

Optional

--duration

Duration of profile data collection. The value range is [1, 4294967295], in seconds. By default, this option is not set. That is, the collection automatically starts and stops with the job execution. If the --delay option is set, the duration starts from the time when the delay ends.

Optional