Merged
docs: 修复注释与文档不一致(circular_pad、clip_by_value、coalesce_sparse 文件注释) #6597
docs: 修复注释与文档不一致(circular_pad、clip_by_value、coalesce_sparse 文件注释) #6597
Merged
TangPCAdd on 20 days ago
TangPC
TangPCCollaborators
20 days ago

描述

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

  • conversion/circular_pad/op_api/aclnn_circular_pad2d.h:#endif 尾注释由 OP_API_INC_CIRCULAR_PAD_H_ 修正为实际保护宏 OP_API_INC_CIRCULAR_PAD2D_H_。
  • conversion/circular_pad/op_api/aclnn_circular_pad3d.h:#endif 尾注释由 OP_API_INC_CIRCULAR_PAD_H_ 修正为实际保护宏 OP_API_INC_CIRCULAR_PAD3D_H_。
  • conversion/clip_by_value/examples/test_geir_clip_by_value.cpp:\file 注释由 test_geir_add_n.cpp 修正为 test_geir_clip_by_value.cpp。
  • conversion/coalesce_sparse/op_kernel/coalesce_sparse.h:#endif 尾注释由 COALESCE_SPARSE 修正为实际保护宏 COALESCE_SPARSE_H。
  • conversion/coalesce_sparse/op_kernel/coalesce_sparse_simt.h:#endif 尾注释由 COALESCE_SPARSE_SIMT 修正为实际保护宏 COALESCE_SPARSE_SIMT_H。

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

关联的Issue

  • #3819 修复注释与文档不一致(circular_pad、clip_by_value、coalesce_sparse)

测试

文档更新

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

类型标签

待确认项

无。

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

变更摘要

本次变更仅为注释修正,不涉及业务逻辑、接口行为或配置默认值调整。主要修正 circular_pad、clip_by_value、coalesce_sparse 三组算子相关头文件与示例文件中的注释与文档不一致问题:将 #endif 尾注释和 Doxygen \file 注释改为与文件实际名称、实际头文件保护宏一致的写法,从而提升注释准确性与可读性。

主要改动

  • circular_pad 头文件保护宏注释修正:aclnn_circular_pad2d.h 与 aclnn_circular_pad3d.h 的 #endif 尾注释分别由 OP_API_INC_CIRCULAR_PAD_H_ 改为 OP_API_INC_CIRCULAR_PAD2D_H_ 和 OP_API_INC_CIRCULAR_PAD3D_H_,与实际保护宏保持一致。
  • clip_by_value 示例文件注释修正:test_geir_clip_by_value.cpp 的 \file 注释由 test_geir_add_n.cpp 更正为该示例自身的文件名,避免文档生成时归属错误。
  • coalesce_sparse 内核头文件尾注释修正:coalesce_sparse.h 与 coalesce_sparse_simt.h 的 #endif 尾注释分别由 COALESCE_SPARSE、COALESCE_SPARSE_SIMT 更正为 COALESCE_SPARSE_H、COALESCE_SPARSE_SIMT_H,与实际保护宏一致。

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

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

代码审查

✅ 未发现问题


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

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
20 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
20 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/coalesce_sparse ✅ 顾宝成, 王林木 (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)
likedislike
CANN-robot
CANN-robotCollaborators
20 days ago Comments:

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
20 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
20 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
20 days ago Comments:

compile

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

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

流水线: https://gitcode.com/CANN/ops-math/actions/runs/ea835ae74fc742cbb00b5744e7168a66 | PR#6597 | 2026-10-22 15:58:25 ~ 2026-10-22 16:07:22 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误 — clang-format + end-of-file-fixer
  • 失败类型: 代码问题
  • 根因: pre-commit 检查项不通过: clang-format 与 fix end of files(end-of-file-fixer)两个 hook 均失败, 共 5 个文件需格式修复(均为本 PR 变更文件)
  • 处置建议: 通知 PR 提交者本地执行 pre-commit run --files <变更文件> (或 pre-commit run -a) 自动修复后重新提交推送
  • 排除项: ruff check / ruff format (无文件需检查, Skipped)、codespell / OAT / trim trailing whitespace 等其余 hook 均通过, 非 CI 环境问题

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — clang-format + end-of-file-fixer
  • 判据: pre-commit 检查项不通过: clang-format(本地执行 pre-commit run clang-format 修复)
  • 定位步骤: 3_precommit.log
  • 影响 Job: CodeCheck_precommit
  • 需修复文件(hook 自动格式化/修复的文件):
文件 违反 hook
conversion/circular_pad/op_api/aclnn_circular_pad3d.h clang-format
conversion/circular_pad/op_api/aclnn_circular_pad2d.h clang-format
conversion/clip_by_value/examples/test_geir_clip_by_value.cpp clang-format
conversion/coalesce_sparse/op_kernel/coalesce_sparse.h clang-format + end-of-file-fixer(文件末尾缺换行)
conversion/coalesce_sparse/op_kernel/coalesce_sparse_simt.h clang-format
  • 根因证据(日志原文):
[2026-10-22 15:59:54.140+08:00] fix end of files.........................................................Failed
[2026-10-22 15:59:54.140+08:00] - hook id: end-of-file-fixer
[2026-10-22 15:59:54.140+08:00] - exit code: 1
[2026-10-22 15:59:54.140+08:00] - files were modified by this hook
[2026-10-22 15:59:54.140+08:00] Fixing conversion/coalesce_sparse/op_kernel/coalesce_sparse.h
[2026-10-22 15:59:54.140+08:00] clang-format.............................................................Failed
[2026-10-22 15:59:54.140+08:00] - hook id: clang-format
[2026-10-22 15:59:54.140+08:00] - files were modified by this hook
[2026-10-22 15:59:54.140+08:00] Formatting [1/4] conversion/circular_pad/op_api/aclnn_circular_pad3d.h
[2026-10-22 15:59:54.140+08:00] Formatting [2/4] conversion/circular_pad/op_api/aclnn_circular_pad2d.h
[2026-10-22 15:59:54.140+08:00] Formatting [3/4] conversion/clip_by_value/examples/test_geir_clip_by_value.cpp
[2026-10-22 15:59:54.140+08:00] Formatting [4/4] conversion/coalesce_sparse/op_kernel/coalesce_sparse.h
[2026-10-22 15:59:54.140+08:00] Formatting [1/1] conversion/coalesce_sparse/op_kernel/coalesce_sparse_simt.h
结构化定界摘要
[{"repo": "ops-math", "run_number": 5535, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误", "Failed_Reason": "CodeCheck_precommit 两个 hook 失败: clang-format 格式化 5 个变更文件(circular_pad/clip_by_value/coalesce_sparse), end-of-file-fixer 修复 coalesce_sparse.h 末尾换行",
  "evidence": "clang-format.............................................................Failed",
  "suggestion": "提交者本地执行 pre-commit run 自动修复格式后重新推送",
  "jobs": "CodeCheck_precommit"}]

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

likedislike
TangPCTangPCCollaborators
20 days ago Pre merge succeeded (commit_id: e14b7dd28eb409593eed1fdaca926bef061d6733)
TangPCTangPCCollaborators
20 days ago Force-pushed 1 commits:5d9c8324-docs: 修复注释与文档不一致(circular_pad、clip_by_value、coalesce_sparse 文件注释)
TangPCTangPCCollaborators
20 days ago Pre merge succeeded (commit_id: c7289b79cf62a8dbf1dcb0149d2fe71bde7b39bf)
CANN-robotCANN-robotCollaborators
20 days ago Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
20 days ago Added label: cann-cla/yes
TangPCTangPCCollaborators
20 days ago Modify description of pull request
TangPC
TangPCCollaborators
20 days ago Comments:

compile

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

/lgtm
/approve

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

/lgtm
/approve
by agent

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

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

likedislike
wangyongguangCollaborators
19 days ago Comments:

/approve

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