昇腾社区首页
中文
注册
开发者
下载

torch_npu.profiler.dynamic_profile.start

产品支持情况

产品 是否支持
[object Object]Atlas A3 训练系列产品[object Object]
[object Object]Atlas A2 训练系列产品[object Object]
[object Object]Atlas 训练系列产品[object Object]

功能说明

触发一次dynamic_profile动态采集。

函数原型

[object Object]

参数说明

config_path (Enum):可选参数,指定为profiler_config.json,需要用户手动创建profiler_config.json配置文件并根据场景需要配置参数。此处须指定具体文件名,例如start("./home/xx/start_config_path/profiler_config.json")。profiler_config_path和start_config_path路径格式仅支持由字母、数字和下划线组成的字符串,不支持软链接。

profiler_config.json文件详细介绍请参见《CANN 性能调优工具用户指南》中的“[object Object]Ascend PyTorch Profiler[object Object]”章节。

返回值说明

调用示例

以下是关键步骤的代码示例,不可直接拷贝编译运行,仅供参考。

[object Object]