Delayed Profiling
When using the msprof CLI to collect profile data, you can use the --delay and --duration options described in this section to configure the collection duration and delay.
Dynamic Profiling is not supported in delayed profiling scenarios.
Availability
Atlas 200/500 A2 Inference Product
Atlas Inference Series Product
Atlas Training Series Product
Atlas A2 Training Series Product/Atlas 800I A2 Inference Product
Atlas A3 Training Series Product
Precautions
- Ensure that an AI task can run properly in the operating environment.
- Ensure that operations in Before You Start have been completed.
The Python call stack, PyTorch or MindSpore framework layer data cannot be profiled. You can use the framework APIs to profile such data.
Command Example
Log in as the running user to the environment where the CANN Toolkit package and ops operator package are installed, and run the following command to collect profile data:
msprof --delay=3 --duration=3 /home/projects/MyApp/out/main
Delayed profiling is supported only when AI task runtime profiling is enabled, and it requires the passing of a user application. This option cannot be configured together with --dynamic.
Options
Option |
Description |
Required/Optional |
|---|---|---|
--delay |
Profiling delay. The value range is [1, 4294967295], in seconds. The default value is 0. If the configured time exceeds the execution time of an AI task, the collection will not be started during the execution of the AI job. |
Optional |
--duration |
Profiling duration. The value range is [1, 4294967295], in seconds. By default, this option is not set. That is, the profiling automatically starts and stops with the task execution. If the --delay option is set, the duration starts from the time when the delay ends. |
Optional |