| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[feat][v2.10.0]torch_npu profiler analysis ability of display prof level0 && kernel shapes Co-authored-by: xieanran<694099604@qq.com> # message auto-generated for no-merge-commit merge: !44928 merge l0shape2.10.0 into v2.10.0 [feat][v2.10.0]torch_npu profiler analysis ability of display prof level0 && kernel shapes Created-by: SoraAzzz Commit-by: xieanran Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单https://gitcode.com/Ascend/pytorch/issues/4212 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 新增形状表头常量 OP_SUMMARY_SHAPE_HEADERS: 在 _csv_headers.py 中新增形状相关列定义(Input Shapes、Input Data Types、Input Formats、Output Shapes、Output Data Types、Output Formats),为 kernel details输出 shape 信息提供表头 新增 _get_kernel_headers 过滤逻辑: 在 _kernel_view_parser.py 中新增类方法 _get_kernel_headers,当 is_all_kernel_headers 为真时返回全部表头;否则仅返回 OP_SUMMARY_SHOW_HEADERS 拼接源数据中存在的表头 generate_view 接入表头过滤: 将 OpSummaryBean.headers 的赋值改为通过 _get_kernel_headers(all_data[0].all_headers, ProfilerConfig().is_all_kernel_headers()) 计算,使 level0 模式下输出 CSV 时过滤掉 Model ID 等非展示字段,同时保留base 表头以及shape表头及数据 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” > kernel_details.csv在l0下存在新增表头 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” > 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!44928 | 3 天前 | |
| 1 年前 | ||
【pytorch_v2.10.0】 add dynamic step Co-authored-by: hewenbo<hewenbo16@h-partners.com> # message auto-generated for no-merge-commit merge: !37366 merge cherry-pick-mr-37318-1780316412419-auto into v2.10.0 【pytorch_v2.10.0】 add dynamic step Created-by: hewenbo Commit-by: hewenbo Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/2209 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 在_DynamicProfile类中增加set_state方法用于保存成员属性的值,用于重新拉起的新节点读取故障前的step值 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 资料中新增set_state接口 # 【接口变更】 在_DynamicProfile类中增加set_state方法用于保存成员属性的值,用于重新拉起的新节点读取故障前的step值 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 修改前:   修改后:   # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!37366 | 2 个月前 | |
AI assist developer for python DT master Co-authored-by: deepSeekya<chenzhihan6@huawei.com> # message auto-generated for no-merge-commit merge: !26305 merge master into master AI assist developer for python DT master Created-by: deepSeekya Commit-by: deepSeekya Merged-by: ascend-robot Description: 【合入说明】 AI辅助研发python dt测试用例生成。 【合入来源】 AI辅助研发需求 dt测试文件覆盖率提升。 See merge request: Ascend/pytorch!26305 | 9 个月前 | |
[fix_torch_profiler_2.10.0]修复profiler L0级别kernel_details.csv无shape信息问题 Co-authored-by: yuliangbin<y1416490440@163.com> # message auto-generated for no-merge-commit merge: !32102 merge fix_profiler_l1_2.10 into v2.10.0 [fix_torch_profiler_2.10.0]修复profiler L0级别kernel_details.csv无shape信息问题 Created-by: yu_liangbin Commit-by: yuliangbin Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 关联issue号:https://gitcode.com/Ascend/pytorch/issues/1586 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 1.功能:解析得时候会根据是否为aicore_none进行kernel_details.csv的表头过滤,但是在l1、aicore_metrics非aicore_none场景下会导致kernel_details.csv表头缺失shape字段,实际上只有l0场景下kernel_details.csv的表头比较少,l1场景下不应该缺失表头,因此过滤逻辑应当是是否为l0,若是l0场景,则过滤,反之不过滤; 2.UT:UT适配 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 不涉及 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 验证结果:离线解析一份l1+aicore_none场景的数据,kernel_details.csv的表头与op_summary.csv的表头一致,未被过滤  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!32102 | 4 个月前 | |
feat(profiler): add fused op flops formulas Co-authored-by: mjsz11<liuchengju5@huawei.com> # message auto-generated for no-merge-commit merge: !38360 merge mfu10 into v2.10.0 feat(profiler): add fused op flops formulas Created-by: hhz0 Commit-by: mjsz11 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/2367 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 1. 在 profiler FLOPs 公式注册中补充融合算子默认 FLOPs 计算规则,新增支持 npu_all_gather_base_mm、npu_transpose_batchmatmul、npu_grouped_matmul、npu_quant_matmul_gelu、npu_grouped_matmul_swiglu_quant_v2、npu_alltoallv_gmm、npu_gmm_alltoallv、npu_block_sparse_attention。 2. 修正 npu_fusion_attention / npu_fused_infer_attention_score 的 Attention FLOPs 口径,按 QK^T + P @ V 统计,使用 q_dim + value_dim,不再误用 key_dim。 3. 统一只统计主 GEMM 或 Attention 矩阵乘 FLOPs,不统计通信、transpose/permute、bias、scale、量化/反量化、GELU/SwiGLU、softmax、dropout 等融合后处理。 4. 补充对应 UT 覆盖融合算子基础 shape、grouped matmul group_list、block sparse attention 有效块统计、BNSD actual lengths,以及 value_dim != key_dim 回归场景。 # 【资料变更】 不涉及。 # 【接口变更】 不涉及。未新增或变更客户可见 API,仅补充 profiler 内部 FLOPs 默认计算公式。 # 【功能验证】 1. 执行 python -m py_compile torch_npu/profiler/_flops_formulas.py test/profiler/test_flops_hook.py,通过。 2. 执行 git diff --check,通过。 3. 通过纯 Python 公式断言验证新增融合算子 FLOPs 计算结果,验证通过。 4. 尝试执行 python -m pytest test/profiler/test_flops_hook.py -q,当前本地环境缺少编译扩展 torch_npu._C,收集阶段报 ModuleNotFoundError,未进入 UT 执行。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!38360 | 2 个月前 | |
feat(profiler): add fused op flops formulas Co-authored-by: mjsz11<liuchengju5@huawei.com> # message auto-generated for no-merge-commit merge: !38360 merge mfu10 into v2.10.0 feat(profiler): add fused op flops formulas Created-by: hhz0 Commit-by: mjsz11 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/2367 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 1. 在 profiler FLOPs 公式注册中补充融合算子默认 FLOPs 计算规则,新增支持 npu_all_gather_base_mm、npu_transpose_batchmatmul、npu_grouped_matmul、npu_quant_matmul_gelu、npu_grouped_matmul_swiglu_quant_v2、npu_alltoallv_gmm、npu_gmm_alltoallv、npu_block_sparse_attention。 2. 修正 npu_fusion_attention / npu_fused_infer_attention_score 的 Attention FLOPs 口径,按 QK^T + P @ V 统计,使用 q_dim + value_dim,不再误用 key_dim。 3. 统一只统计主 GEMM 或 Attention 矩阵乘 FLOPs,不统计通信、transpose/permute、bias、scale、量化/反量化、GELU/SwiGLU、softmax、dropout 等融合后处理。 4. 补充对应 UT 覆盖融合算子基础 shape、grouped matmul group_list、block sparse attention 有效块统计、BNSD actual lengths,以及 value_dim != key_dim 回归场景。 # 【资料变更】 不涉及。 # 【接口变更】 不涉及。未新增或变更客户可见 API,仅补充 profiler 内部 FLOPs 默认计算公式。 # 【功能验证】 1. 执行 python -m py_compile torch_npu/profiler/_flops_formulas.py test/profiler/test_flops_hook.py,通过。 2. 执行 git diff --check,通过。 3. 通过纯 Python 公式断言验证新增融合算子 FLOPs 计算结果,验证通过。 4. 尝试执行 python -m pytest test/profiler/test_flops_hook.py -q,当前本地环境缺少编译扩展 torch_npu._C,收集阶段报 ModuleNotFoundError,未进入 UT 执行。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!38360 | 2 个月前 | |
test update ut Co-authored-by: huangyunlong2022<huangyunlong4@h-partners.com> # message auto-generated for no-merge-commit merge: !32257 merge 2.10ut into v2.10.0 test update ut Created-by: huangyunlong2022 Commit-by: huangyunlong2022 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [x] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 更新ut # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!32257 | 4 个月前 | |
fix: lintrunner --all-files --take NEWLINE -a Co-authored-by: huangjingwei<huangjingwei4@huawei.com> # message auto-generated for no-merge-commit merge: !35873 merge v2.10.0_lintrunner into v2.10.0 fix: lintrunner --all-files --take NEWLINE -a Created-by: huangjingwei Commit-by: huangjingwei Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 1. 执行: lintrunner --all-files --take NEWLINE -a 修复换行符,不影响代码逻辑。 2. 屏蔽两个分布式用例,已提issue,给对应接口人跟踪。 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 不涉及 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!35873 | 3 个月前 | |
[sync] PR-37136: [feat]profiler add ProfilerStep range Co-authored-by: hehongzhe<935062458@qq.com> # message auto-generated for no-merge-commit merge: !37514 merge sync-pr37136-tx7-to-v2.10.0 into v2.10.0 [sync] PR-37136: [feat]profiler add ProfilerStep range Created-by: ascend-ds-bot Commit-by: hehongzhe Merged-by: ascend-robot Description: ### 1. Origin pull request: https://gitcode.com/Ascend/pytorch/merge_requests/37136 ### 2. Original pull request related issue(s): https://gitcode.com/Ascend/pytorch/issues/2223 ### 3. Original pull request related commit(s): | Sha | Datetime | Message | |---|---|---| |[0ec3656a](https://gitcode.com/Ascend/pytorch/commit/0ec3656a5b5faec26b77e1c93f9e01881f6f5606)|2026-06-02 12:28:23 +0800 CST|profiler add ProfilerStep range<br>| See merge request: Ascend/pytorch!37514 | 2 个月前 | |
feat(profiler): add fused op flops formulas Co-authored-by: mjsz11<liuchengju5@huawei.com> # message auto-generated for no-merge-commit merge: !38360 merge mfu10 into v2.10.0 feat(profiler): add fused op flops formulas Created-by: hhz0 Commit-by: mjsz11 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/2367 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 1. 在 profiler FLOPs 公式注册中补充融合算子默认 FLOPs 计算规则,新增支持 npu_all_gather_base_mm、npu_transpose_batchmatmul、npu_grouped_matmul、npu_quant_matmul_gelu、npu_grouped_matmul_swiglu_quant_v2、npu_alltoallv_gmm、npu_gmm_alltoallv、npu_block_sparse_attention。 2. 修正 npu_fusion_attention / npu_fused_infer_attention_score 的 Attention FLOPs 口径,按 QK^T + P @ V 统计,使用 q_dim + value_dim,不再误用 key_dim。 3. 统一只统计主 GEMM 或 Attention 矩阵乘 FLOPs,不统计通信、transpose/permute、bias、scale、量化/反量化、GELU/SwiGLU、softmax、dropout 等融合后处理。 4. 补充对应 UT 覆盖融合算子基础 shape、grouped matmul group_list、block sparse attention 有效块统计、BNSD actual lengths,以及 value_dim != key_dim 回归场景。 # 【资料变更】 不涉及。 # 【接口变更】 不涉及。未新增或变更客户可见 API,仅补充 profiler 内部 FLOPs 默认计算公式。 # 【功能验证】 1. 执行 python -m py_compile torch_npu/profiler/_flops_formulas.py test/profiler/test_flops_hook.py,通过。 2. 执行 git diff --check,通过。 3. 通过纯 Python 公式断言验证新增融合算子 FLOPs 计算结果,验证通过。 4. 尝试执行 python -m pytest test/profiler/test_flops_hook.py -q,当前本地环境缺少编译扩展 torch_npu._C,收集阶段报 ModuleNotFoundError,未进入 UT 执行。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!38360 | 2 个月前 | |
| 1 年前 | ||
[Fix] Fix static check errors detected by SPACES Co-authored-by: huangjingwei<huangjingwei4@huawei.com> # message auto-generated for no-merge-commit merge: !36365 merge v2.10.0_lintrunner into v2.10.0 [Fix] Fix static check errors detected by SPACES Created-by: huangjingwei Commit-by: huangjingwei Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 检测和删除代码中的行尾空白字符 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 不涉及 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!36365 | 3 个月前 | |
| 2 年前 | ||
对齐Pytorch Profiler部分接口 Co-authored-by: xfeng<zchlcw663@163.com> # message auto-generated for no-merge-commit merge: !34297 merge v2.10.0 into v2.10.0 对齐Pytorch Profiler部分接口 Created-by: zyb_230 Commit-by: xfeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/1802 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 对齐pytorch profiler的部分接口: 一个是增加一个 skip_first_wait:  一个是custom_trace_id_callback,然后增加两个对应的set和get的接口set_custom_trace_id_callback和get_trace_id   # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” **涉及,需要和资料沟通** # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 涉及,前面已经说明 # 【功能验证】 **场景1** 设置schedule = torch_npu.profiler.schedule(wait=2, warmup=1, active=1, repeat=2, skip_first=0, skip_first_wait=1) 之前:采集第3和第7个step  现在:采集第1和第5个step  **场景2** 测试get_trace_id接口: …… with torch_npu.profiler.profile( activities=[ torch_npu.profiler.ProfilerActivity.NPU, torch_npu.profiler.ProfilerActivity.CPU, ], with_stack=True, schedule = torch_npu.profiler.schedule(wait=2, warmup=1, active=2, repeat=2, skip_first=1, skip_first_wait=1), on_trace_ready=torch_npu.profiler.tensorboard_trace_handler("./result_profiling"), experimental_config=experimental_config) as prof: for i in range(12): add(x0, x1) prof.step() print(f"step {i}: {prof.get_trace_id()}") ……  默认是一个uuid,是直接从pytorch里面拷贝过来的,现在会在profiler_metadata.json里面落盘,db里面也有    **场景3** 异常的skip_first_wait参数不生效,reset为0 正常: 异常:必须设置为整数,否则有警告信息,reset为0   **场景4:** 设置custom_trace_id_callback,这个trace_id,我们是想和每一份ascend_pt数据或者repeat参数绑定的, class RepeatTraceIdGenerator: def __init__(self): self.repeat_count = 0 # 从 0 开始 def __call__(self) -> str: # 每一轮 profile 启动,计数 +1 current_id = str(self.repeat_count) self.repeat_count += 1 return current_id trace_id_gen = RepeatTraceIdGenerator() …… with torch_npu.profiler.profile( activities=[ torch_npu.profiler.ProfilerActivity.NPU, torch_npu.profiler.ProfilerActivity.CPU, ], with_stack=True, schedule = torch_npu.profiler.schedule(wait=2, warmup=1, active=2, repeat=2, skip_first=1, skip_first_wait=1), on_trace_ready=torch_npu.profiler.tensorboard_trace_handler("./result_profiling"), experimental_config=experimental_config, custom_trace_id_callback=trace_id_gen) as prof: for i in range(12): add(x0, x1) prof.step() print(f"step {i}: {prof.get_trace_id()}")  如果call_back类型不对,会有警告信息,然后使用默认的uuid  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!34297 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 天前 | ||
| 1 年前 | ||
| 2 个月前 | ||
| 9 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 1 年前 | ||
| 3 个月前 | ||
| 2 年前 | ||
| 3 个月前 |