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 ToolUse CaseParsing ToolDescription
msProfGeneralmsProf 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.
msPTIGeneralmsPTIA general-purpose API. Profiling tools developed using the msPTI API take effect in inference and training use cases of various frameworks.
msServiceProfilerMindIE Service inference servingmsServiceProfilerCollects 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 ProfilerPyTorchAscend PyTorch ProfilerUsed 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 ProfilerMindSporeMindSpore ProfilerUsed 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
TensorFlowmsProf offline parsingUsed 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 variablesTensorFlowmsProf offline parsingAllow 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 APIsGraph developmentmsProf offline parsingUsed 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++ APIsOffline inferencemsProf offline parsingThe 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 APIsOffline inferencemsProf offline parsingPython 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.jsonOffline inferencemsProf offline parsingA 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.