MindStudio Profiler
🚀 Ascend Profile Data Collection Tool
📢 What's New
- [2025.12.30]: Initial release of the MindStudio Profiler (msProf) project.
📌 Overview
msProf is a profile data analysis tool for AI training and inference scenarios. It supports the collection and analysis of software and hardware profile data from the CANN platform and Ascend AI Processors, helping users locate performance bottlenecks during model training or inference.

⚙️ Functions
| Function | Description | Document | Source Code Repository |
|---|---|---|---|
| Profile data collection | Collects software and hardware profile data from the CANN platform and Ascend AI Processors by using msprof commands. |
Profile Data Collection | msprof |
| Profile data parsing | Parses the collected profile data to generate human-readable analysis results by using the msProf tool. | Profile Data Parsing | analysis |
🛠️ Tool Installation
msProf is included in the CANN Toolkit. You are advised to download and install the CANN package directly. For details, see CANN Software Installation Guide.
After installing the CANN package, run the following command to set the environment variables:
# ${install_path} indicates the installation directory of the CANN software, such as /usr/local/Ascend/ascend-toolkit.
source ${install_path}/set_env.sh
Run the following command to check whether the installation is successful:
msprof --help
To build and install the tool from the source code, see MindStudio Profiler Installation Guide.
🚀 Quick Start
You can use the msProf tool through the command line, and the general syntax for data collection is as follows:
msprof --output=< output directory> --application="<application> <argument>"
Examples:
# Example 1: Collect profile data for Python tasks.
msprof --output=./output --application="python3 train.py"
# Example 2: Collect profile data for AI tasks launched by a shell script.
msprof --output=./output --application="./run_standalone_train.sh"
Taking profile data from a ResNet-50 model training task as an example, Quick Start guides you through the entire profiling process. It helps you quickly experience the core functions of msProf, including data collection, parsing, export, and performance profiling, within a 10-minute workflow.
🗂️ Directory Structure
The key directories are as follows. For details, see Project Directory.
.
├── .gitcode # Repository metadata directory
├── analysis # Data parsing directory
├── build # Build directory
│ └── build.sh # Build script
├── cmake # CMake file directory
├── docs # Documentation directory
│ └── en # English documentation
├── misc # Miscellaneous tools
│ ├── function_monitor # Lightweight function monitoring tool
│ └── gil_tracer # Python GIL lock detection tool
├── samples # Tool sample directory
│ └── README.md # Sample description
├── scripts # Installation- and upgrade-related scripts
├── test # Test and coverage statistics scripts
└── README.md # Project description
📝 References
💬 Suggestions and Feedback
You are welcome to contribute to the community. If you have any questions or suggestions, please submit issues. We will reply as soon as possible. Thank you for your support.
🤝 Acknowledgments
This tool is developed by the following Huawei department:
- Ascend Computing MindStudio Development Department
Thank you to everyone in the community for your PRs. We warmly welcome your contributions.
👥 About the MindStudio Team
The Huawei MindStudio full-pipeline development toolchain team is dedicated to providing an end-to-end solution for building Ascend AI applications, accelerating the processes of training, inference, and operator development. You can learn more about the Huawei MindStudio team through the following channels: