Overview

Introduction

The profiling module provides the MSPTI Python APIs to profile data of each module.

MSPTI describes the functions and examples of MSPTI APIs.

APIs

Specific APIs are listed below.

Table 1 MSPTI Python API

API

Description

HcclMonitor

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

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

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

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

Struct corresponding to the activity record type MSPTI_ACTIVITY_KIND_MARKER.

Enumeration type

msptiResult

Error and result code returned by MSPTI.

msptiActivityKind

All activity types supported by MSPTI.

msptiActivityFlag

Activity record flag.

msptiActivitySourceKind

Marks the activity data source.