跳转至

MstxMonitor.set_buffer_size

Supported Products

Note: For details about Ascend product models, see Ascend Product Models.

Product Type Supported
Ascend 950 products
Atlas A3 training products/Atlas A3 inference products
Atlas A2 training products/Atlas A2 inference products
Atlas 200I/500 A2 inference products
Atlas inference products ×
Atlas training series products ×

Function Usage

Sets the size of the activity buffer before profiling starts to store the profile data.

During the profiling, the dynamic modification of the activity buffer size does not take effect. The modification takes effect only after the current profiling is complete and the next profiling starts.

Function Prototype

def set_buffer_size(cls, size: int) -> MsptiResult:

Parameter Description

Parameter Name

Input/Output

Description

size:int

Enter

.

size: size of the activity buffer, in MB. The default value is 8 MB.

The value of

must be a positive integer. If the value is invalid, a failure message is returned and the default activity buffer size is used.

Return Values

If MsptiResult.MSPTI_SUCCESS is returned, the setting is successful. If MsptiResult.MSPTI_ERROR_INVALID_PARAMETER is returned, the setting fails because the parameter is incorrect.