Overview
When tuning performance, use the performance tuning tools to collect and analyze key performance metrics of each running phase of AI tasks running on Ascend AI processors. Based on the collected profile data, you can quickly locate software and hardware performance bottlenecks, a way to more efficient AI task performance analysis.
Performance tuning involves many use cases. The following table associates collections tools with use cases and parsing tools for your reference.
| Collection Tool | Use Case | Parsing Tool | Description |
|---|---|---|---|
| msProf | General | msProf automatic parsing msProf offline parsing | A CLI tool that provides complete profiling capabilities (covering more data types). Constraints: It does not collect Python call stacks and framework-layer data of PyTorch or MindSpore. Use the matching framework APIs for profiling. |
| msPTI | General | msPTI | A general-purpose API. Profiling tools developed using the msPTI API take effect in inference and training use cases of various frameworks. |
| msServiceProfiler | MindIE Service inference serving | msServiceProfiler | Collects start and end timestamps of key processes, identifies information such as key functions or iterations, and records key events in MindIE Service inference serving processes. It collects diverse information, enabling quick demarcation of performance issues. |
| Ascend PyTorch Profiler | PyTorch | Ascend PyTorch Profiler | Used for PyTorch-based programming. Constraints: It applies only to training and online inference use cases and you need to call profiling-related code during AI framework programming. |
| MindSpore Profiler | MindSpore | MindSpore Profiler | Used for MindSpore-based programming. Constraints: It applies only to training and online inference use cases and you need to call profiling-related code during AI framework programming. This tool has stopped evolution. |
| TensorFlow 1.15 framework API TensorFlow 2.6.5 framework API | TensorFlow | msProf offline parsing | Used for TensorFlow-based programming. Constraints: It applies only to training and online inference use cases and you need to call profiling-related code during AI framework programming. |
| Environment variables | TensorFlow | msProf offline parsing | Allow profiling configuration to be migrated to environment variable scripts of different training or online inference environments for execution. Constraints: They apply only to training and online inference use cases. |
| Ascend graph APIs | Graph development | msProf offline parsing | Used for Ascend graph development. Constraints: They apply only to training and online inference use cases and you need to call profiling-related APIs in Ascend graph programming. |
| acl C&C++ APIs | Offline inference | msProf offline parsing | The most flexible profiling solution that allows for customization. Constraints: They apply only to offline inference use cases and you need to call profiling-related APIs in applications. |
| acl Python APIs | Offline inference | msProf offline parsing | Python wrapper of the acl APIs. Constraints: They apply only to offline inference use cases and you need to call profiling-related APIs in applications. |
| acl.json | Offline inference | msProf offline parsing | A configuration file that supports unified configuration of profiling and other components. Constraints: It applies only to offline inference use cases and you need to modify the file. |