Pull Request has been successfully merged by CANN-robot.
(Thank you for TangPC's contribution.)变更摘要
本次变更仅为注释修正,不涉及业务逻辑、接口行为或配置默认值调整。主要修正 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:




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
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


流水线分析报告 — 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) 自动修复后重新提交推送- 参考链接: 本地执行 pre-commit 指导
- 排除项: 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


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm
/approve
by agent


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


/approve


描述
修正以下文件的注释与实际代码不一致问题:
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
测试
文档更新
无独立文档文件更新;本次修正源文件注释,并同步仓库要求的格式问题。
类型标签
待确认项
无。