Merged
docs: 修复注释与文档不一致(concat、diag_v2、dynamic_stitch 等 文件注释) #6598
docs: 修复注释与文档不一致(concat、diag_v2、dynamic_stitch 等 文件注释) #6598
Merged
TangPCAdd on 18 days ago
TangPC
TangPCCollaborators
18 days ago

描述

修正以下文件的注释与实际代码不一致问题:

  • conversion/concat/tests/ut/op_host/test_concat_infershape.cpp:\file 注释由 test_concat_infershpe.cpp 修正为 test_concat_infershape.cpp。
  • conversion/diag_v2/op_kernel/diag_v2_b32.h:#endif 尾注释由 DIAG_V2_B64_H 修正为实际保护宏 DIAG_V2_B32_H。
  • conversion/dynamic_stitch/op_kernel/arch35/dynamic_stitch_scatter_simt.h:\file 注释由 dynamic_stitch_simt.h 修正为 dynamic_stitch_scatter_simt.h。
  • conversion/fill/op_api/aclnn_fill_scalar.h:#endif 尾注释由 OP_API_INC_FILL_H_ 修正为实际保护宏 OP_API_ACLNN_FILL_SCALAR_H_。
  • conversion/fill/op_api/aclnn_fill_tensor.h:#endif 尾注释由 OP_API_INC_LEVEL2_ACLNN_FILL_TENSOR_H_ 修正为实际保护宏 OP_API_ACLNN_FILL_TENSOR_H_。

此外,按仓库 pre-commit 要求,对被修改文件应用了文件末尾换行/空白/clang-format 修复(仅格式调整,不涉及业务逻辑、接口行为或配置默认值)。

关联的Issue

测试

文档更新

无独立文档文件更新;本次修正源文件注释,并同步仓库要求的格式问题。

类型标签

待确认项

无。

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for TangPC's contribution.)
TangPCTangPCCollaborators
18 days ago Created pull request, commit 12e5b870
atomgit-bot
atomgit-bot
18 days ago Comments:

变更摘要

本 PR 属于纯注释修正,不涉及业务逻辑、接口行为或配置默认值的变化。改动集中在修正多处注释与代码实际内容不一致的问题:包括文件头 \file 注释中的文件名拼写或命名错误,以及头文件 #endif 尾部注释中与真实包含保护宏不符的宏名。涉及 concat 的 infershape UT、diag_v2 的 B32 kernel 头文件、dynamic_stitch 的 arch35 SIMT 头文件,以及 fill 的两个 op_api 头文件。

主要改动

  • 修正 concat UT 文件头注释: test_concat_infershape.cpp 中的 \file 注释由拼写错误的 test_concat_infershpe.cpp 改为与实际文件名一致的 test_concat_infershape.cpp。
  • 修正 diag_v2 头文件保护宏尾注释: diag_v2_b32.h 末尾的 #endif 注释由 DIAG_V2_B64_H 更正为实际保护宏 DIAG_V2_B32_H。
  • 修正 dynamic_stitch SIMT 头文件注释: arch35/dynamic_stitch_scatter_simt.h 的 \file 注释由 dynamic_stitch_simt.h 更正为 dynamic_stitch_scatter_simt.h。
  • 修正 fill op_api 头文件保护宏尾注释: aclnn_fill_scalar.h 的 #endif 注释由 OP_API_INC_FILL_H_ 更正为 OP_API_ACLNN_FILL_SCALAR_H_,aclnn_fill_tensor.h 的 #endif 注释由 OP_API_INC_LEVEL2_ACLNN_FILL_TENSOR_H_ 更正为 OP_API_ACLNN_FILL_TENSOR_H_。

🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
atomgit-bot
atomgit-bot
18 days ago Comments:

代码审查

✅ 未发现问题


🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
18 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
18 days ago Comments:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
*/*/op_api/*.h ✅ 王永光, 王林木, 顾宝成 (3/2) ✅ 王永光 (1/1)
conversion/concat ✅ 顾宝成, 王林木 (2/2) ✅ 顾宝成, 王林木 (2/1)
repo-cann/ops-math ✅ 王林木, 顾宝成 (2/2) ✅ 王林木, 顾宝成 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

pingchuantang, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
18 days ago Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,onanfield,zhanw_coding,clinglai0517 as approver
CANN-robotCANN-robotCollaborators
18 days ago Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,onanfield,zhanw_coding,clinglai0517 as approver
TangPC
TangPCCollaborators
18 days ago Comments:

compile

likedislike
TangPCTangPCCollaborators
18 days ago Pre merge succeeded (commit_id: 312a29273209c6d878f60af86775714ceb368740)
CANN-robot
CANN-robotCollaborators
18 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-failed
CANN-robot
CANN-robotCollaborators
18 days ago Comments:

流水线分析报告 — ops-math run#5536

流水线: https://gitcode.com/CANN/ops-math/actions/runs/a8d51e42df924b909bd44b69758f35b1 | PR#6598 | 2026-10-22 15:58:29 ~ 2026-10-22 16:09:34 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误 — pre-commit 格式检查不通过
  • 失败类型: 代码问题
  • 根因: PR 变更文件未通过 pre-commit 格式检查, 3 个 hook 失败: clang-format、trim trailing whitespace、fix end of files, 共涉及 5 个文件
  • 处置建议: 通知 PR 提交者修复 —— 本地执行 pre-commit run --files <变更文件> (或 pre-commit run --all-files) 自动修复格式后重新提交推送
  • 排除项: codespell、OAT Compliance Check、check for merge conflicts、detect private key 等其余检查项均 Passed; 非 CI 环境/工具问题

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — clang-format 等 3 项格式 hook 失败
  • 判据: pre-commit 检查项不通过: clang-format / trailing-whitespace / end-of-file-fixer (均属格式类, 同因归组)
  • 定位步骤: 3_precommit.log
  • 影响 Job: CodeCheck_precommit
  • 涉及文件:
    • clang-format 重排: conversion/diag_v2/op_kernel/diag_v2_b32.h, conversion/concat/tests/ut/op_host/test_concat_infershape.cpp, conversion/dynamic_stitch/op_kernel/arch35/dynamic_stitch_scatter_simt.h, conversion/fill/op_api/aclnn_fill_scalar.h, conversion/fill/op_api/aclnn_fill_tensor.h
    • 行尾空白: conversion/dynamic_stitch/op_kernel/arch35/dynamic_stitch_scatter_simt.h
    • 文件末尾换行: conversion/fill/op_api/aclnn_fill_tensor.h
  • 根因证据(日志原文):
[2026-10-22 15:59:54.243+08:00] trim trailing whitespace.................................................Failed
[2026-10-22 15:59:54.251+08:00] fix end of files.........................................................Failed
[2026-10-22 15:59:54.265+08:00] clang-format.............................................................Failed
[2026-10-22 15:59:54.276+08:00] Formatting [1/1] conversion/fill/op_api/aclnn_fill_tensor.h
[2026-10-22 15:59:54.331+08:00] [py stderr] ❌ 存在部分文件格式错误
[2026-10-22 15:59:54.341+08:00] ::error::precommit.py 异常退出: exit code=1, signal=null
结构化定界摘要
[{"repo": "ops-math", "run_number": 5536, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误", "Failed_Reason": "PR 变更文件未通过 pre-commit 格式检查: clang-format、trim trailing whitespace、fix end of files 三项 hook 失败, 涉及 diag_v2/concat/dynamic_stitch/fill 共 5 个文件",
  "evidence": "clang-format.............................................................Failed",
  "suggestion": "提交者本地执行 pre-commit run --files <变更文件> 自动修复格式后重新推送",
  "jobs": "CodeCheck_precommit"}]

由门禁失败定界分析自动生成 | repo: ops-math | run: a8d51e42df924b909bd44b69758f35b1 | PR#6598

likedislike
TangPCTangPCCollaborators
18 days ago Pre merge succeeded (commit_id: f13f02bcb2316bd2ac69856307adaaa703c37943)
TangPCTangPCCollaborators
18 days ago Force-pushed 1 commits:e4b85eba-docs: 修复注释与文档不一致(concat、diag_v2、dynamic_stitch 等 文件注释)
TangPCTangPCCollaborators
18 days ago Pre merge succeeded (commit_id: 1d0a6e58158a3bbc0e7441667530a66ed4f444b9)
CANN-robotCANN-robotCollaborators
18 days ago Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
18 days ago Added label: cann-cla/yes
TangPCTangPCCollaborators
18 days ago Modify description of pull request
TangPC
TangPCCollaborators
18 days ago Comments:

compile

likedislike
TangPCTangPCCollaborators
18 days ago Pre merge succeeded (commit_id: 389108773fb18ec925ee203a61594739ef522378)
CANN-robot
CANN-robotCollaborators
18 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
18 days ago Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-passed
TangPCTangPCCollaborators
18 days ago Modify description of pull request
llimwangCollaborators
18 days ago Comments:

/lgtm
/approve

likedislike
WwangyongguangCollaborators
18 days ago Approval passed
gubaochengCollaborators
18 days ago Comments:

/lgtm
/approve
by agent

likedislike
CANN-robotCANN-robotCollaborators
18 days ago Added label: lgtm
chenyifengCollaborators
18 days ago Comments:

您好,PR已满足合入指标,请尽快联系Committer进行合入。如暂时不需要合入,请在PR标题前加[WIP]

likedislike
wangyongguangCollaborators
17 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
17 days ago Added label: approved
CANN-robotCANN-robotCollaborators
17 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
17 days ago Merged pull request