Files
m0_68000167 bc7fb138b7 modify document
Co-authored-by: m0_68000167<wangzhiyuan86@h-partners.com>



# message auto-generated for no-merge-commit merge:
!46094 merge master into master

modify document

Created-by: m0_68000167
Commit-by: m0_68000167
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>

- [ ] 需求
- [ ] 问题单
- [x] issue/工单https://gitcode.com/Ascend/op-plugin/issues/320
- [ ] 重构优化
- [x] 资料更新

# 【修改方案】
英文资料合入

# 【资料变更】
涉及

# 【接口变更】
不涉及

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

- [x] 代码注释完备,正确记录错误日志
- [x] 代码实现进行了返回值、空指针等校验
- [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
- [x] PR持续集成流水线(CI)执行通过,代码检查无异常


See merge request: Ascend/pytorch!46094
2026-09-09 18:22:45 +08:00

2.0 KiB

PROF_CONFIG_PATH

Feature Description

In TorchNPU training scenarios, this environment variable specifies the path to the profiler_config.json configuration file of the dynamic_profile collection function of the TorchNPU Profiler interface.

Configuration Example

export PROF_CONFIG_PATH="/path/to/profiler_config_path"
  • After this environment variable is configured and training is started, dynamic_profile automatically creates the template file profiler_config.json under profiler_config_path. You can customize the configuration items based on the template file.
  • The path specified by PROF_CONFIG_PATH can be customized (read and write permissions are required). The path format supports only strings consisting of letters, digits, and underscores. Soft links are not supported. For example, /home/xxx/profiler_config_path.
  • For details about the dynamic_profile collection function and the profiler_config.json file, see the "dynamic_profile dynamic collection" section in the CANN Performance Tuning Tool.

Usage Constraints

  • If no code is manually added to the script, this environment variable applies to TorchNPU training scenarios.

  • After the dynamic_profile module is added to the script, this environment variable can be used in non-training scenarios. For example:

    # Load the dynamic_profile module
    from torch_npu.profiler import dynamic_profile as dp
    # Set the path of the profiling configuration file
    dp.init("profiler_config_path")
    …
    for step in steps:
        train_one_step()
        # Mark the step
        dp.step()
    

Supported Products

  • Atlas training products
  • Atlas A2 training products
  • Atlas A3 training products
  • Ascend 950DT