mindspore.profiler.profiler.analyse

View Source On Gitee
mindspore.profiler.profiler.analyse(profiler_path: str, max_process_number: int = os.cpu_count() // 2, pretty=False, step_list=None, data_simplification=True)[source]

Analyze training performance data offline, which is invoked after performance data collection is completed.

Parameters
  • profiler_path (str) – The path to profiling data that needs to be analyzed offline, specified to the upper directory *_ascend_ms.

  • max_process_number (int, optional) – Maximum number of processes. The default value is os.cpu_count() // 2.

  • pretty (bool, optional) – Format the JSON file. Default: False, indicating that the formatting is not performed.

  • step_list (list, optional) – Only the performance data of the specified step is parsed. The specified step must be a consecutive integer. It supports CallBack collection only in GRAPH mode, and can only slice the CANN layer and the following information. Default value: None, that is, full resolution.

  • data_simplification (bool, optional) – Whether to enable data simplification. Default: True, indicating the data simplification is enabled.

Examples

>>> from mindspore.profiler.profiler import analyse
>>> analyse(profiler_path="./profiling_path")