General Description ¶
Interface Overview¶
The Profiling module provides the msPTI Python API to collect performance data of each module.
For details about the functions and usage examples of the msPTI API, see msPTI Tool.
Interface List¶
APIs are listed below.
Table 1 msPTI Python APIs
| Interface | Description |
|---|---|
| HcclMonitor Type | HcclMonitor Description |
| HcclMonitor.start | Marks the start of the communication operator profiling. |
| HcclMonitor.stop | Marks the end of the communication operator profiling. |
| HcclMonitor.flush_all | Calls the callback function to write all activity data in the buffer to the user memory. |
| HcclMonitor.set_buffer_size | Sets the size of the activity buffer before profiling starts. |
| KernelMonitor Type | KernelMonitor Description |
| KernelMonitor.start | Marks the start of the kernel profiling. |
| KernelMonitor.stop | Marks the end of the kernel profiling. |
| KernelMonitor.flush_all | Calls the callback function to write all activity data in the buffer to the user memory. |
| KernelMonitor.set_buffer_size | Sets the size of the activity buffer before profiling starts. |
| MstxMonitor Type | Description of MstxMonitor |
| MstxMonitor.start | Marks the start of the mstx profiling. |
| MstxMonitor.stop | Marks the end of the mstx marker for profiling. |
| MstxMonitor.enable_domain | Enables the profiling for a specific domain. |
| MstxMonitor.disable_domain | Disables the profiling for a specific domain. |
| MstxMonitor.flush_all | Calls the callback function to write all activity data in the buffer to the user memory. |
| MstxMonitor.set_buffer_size | Sets the size of the activity buffer before profiling starts. |
| Data structure type | Description of Data Structure |
| HcclData | Struct corresponding to the activity record type MSPTI_ACTIVITY_KIND_HCCL. |
| KernelData | Struct corresponding to the activity record type MSPTI_ACTIVITY_KIND_KERNEL. |
| MarkerData | Struct corresponding to the activity record type MSPTI_ACTIVITY_KIND_MARKER. |
| RangeMarkerData | Structure corresponding to MSPTI_ACTIVITY_KIND_MARKER of the activity record type. |
| Enumeration type | Enumeration description |
| msptiResult | Error and result code returned by MSPTI. |
| msptiActivityKind | All activity types supported by MSPTI. |
| msptiActivityFlag | Activity record flag. |
| msptiActivitySourceKind | Activity data source. |