Merged
docs: 修复注释与文档不一致(fill_diagonal_v2、fill_v2、fills 等 文件注释) #6599
docs: 修复注释与文档不一致(fill_diagonal_v2、fill_v2、fills 等 文件注释) #6599
Merged
TangPCAdd on 19 days ago
TangPC
TangPCCollaborators
19 days ago

描述

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

  • conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp:\file 注释由 test_fill_diagonal_v2_proto.cpp 修正为 test_fill_diagonal_v2_infershape.cpp。
  • conversion/fill_diagonal_v2/tests/ut/op_kernel/test_fill_diagonal_v2_tiling.h:#endif 尾注释由 _FAST_OP_TEST_FILL_DIAGONAL_TILING_H_ 修正为实际保护宏 _FAST_OP_TEST_FILL_DIAGONAL_V2_TILING_H_。
  • conversion/fill_v2/op_graph/fill_v2_proto.h:#endif 尾注释由 OP_PROTO_FILL_V2_H_ 修正为实际保护宏 FILL_V2_PROTO_H_。
  • conversion/fills/tests/ut/op_host/test_fills_infershape.cpp:\file 注释由 test_fills_proto.cpp 修正为 test_fills_infershape.cpp。
  • conversion/identity_n/op_graph/identity_n_proto.h:#endif 尾注释由 SHAPE_N_PROTO_H_ 修正为实际保护宏 IDENTITY_N_PROTO_H_。

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

关联的Issue

测试

文档更新

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

类型标签

待确认项

无。

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

变更摘要

本 PR 属于纯注释修正,聚焦于修正若干源文件中注释与实际代码不一致的问题:包括测试文件头部 \file 声明中的文件名,以及若干头文件 #endif 尾注释中引用的头文件保护宏名称。改动仅涉及注释文本,不改变业务逻辑、接口行为或配置默认值。

主要改动

  • 修正 fill_diagonal_v2 推理测试文件头注释:test_fill_diagonal_v2_infershape.cpp 的 \file 注释由 test_fill_diagonal_v2_proto.cpp 改为与文件名一致的 test_fill_diagonal_v2_infershape.cpp。
  • 修正 fill_diagonal_v2 tiling 测试头文件尾注释:test_fill_diagonal_v2_tiling.h 的 #endif 尾注释由 _FAST_OP_TEST_FILL_DIAGONAL_TILING_H_ 改为与实际保护宏一致的 _FAST_OP_TEST_FILL_DIAGONAL_V2_TILING_H_。
  • 修正 fill_v2 原型头文件尾注释:fill_v2_proto.h 的 #endif 尾注释由 OP_PROTO_FILL_V2_H_ 改为实际保护宏 FILL_V2_PROTO_H_。
  • 修正 fills 推理测试文件头注释:test_fills_infershape.cpp 的 \file 注释由 test_fills_proto.cpp 改为 test_fills_infershape.cpp。
  • 修正 identity_n 原型头文件尾注释:identity_n_proto.h 的 #endif 尾注释由 SHAPE_N_PROTO_H_ 改为实际保护宏 IDENTITY_N_PROTO_H_。

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

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

代码审查

✅ 未发现问题


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

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
19 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
19 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_graph/*_proto.h ✅ 王永光, 顾宝成, 王林木 (3/2) ✅ 王永光 (1/1)
conversion/fill_diagonal_v2 ✅ 王林木, 顾宝成 (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
19 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
19 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
19 days ago Comments:

compile

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

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

流水线: https://gitcode.com/CANN/ops-math/actions/runs/37a00b5e33ea4af8aff675ce1ec8213d | PR#6599 | 2026-10-22 15:58:36 ~ 2026-10-22 16:08:43 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误 — pre-commit 格式检查未通过(clang-format / 尾随空白 / 文件末尾)
  • 失败类型: 代码问题
  • 根因: CodeCheck_precommit Job 中 pre-commit 检查有 3 个 hook 失败: trim trailing whitespace、fix end of files、clang-format, 涉及 PR 变更的 5 个文件(行尾空白/文件末尾换行/C++ 代码格式不符合规范)
  • 处置建议: 通知 PR 提交者本地执行 pre-commit run --files <变更文件>(或 pre-commit run -a)自动修复后重新推送
  • 排除项: 其余 hook(check for added large files / merge conflicts / detect private key / codespell / OAT 合规检查)均 Passed; ruff 无 Python 文件需检查(Skipped), 非失败因素

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — pre-commit 三项格式 hook 失败, 涉及 fill_diagonal_v2/fill_v2/fills/identity_n 共 5 个变更文件
  • 判据: pre-commit 检查项不通过: clang-format(本地执行 pre-commit run clang-format 修复)
  • 定位步骤: 3_precommit.log
  • 影响 Job: CodeCheck_precommit
  • 失败 hook 与涉及文件:
    • trim trailing whitespace — Failed: conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp
    • fix end of files — Failed: conversion/fill_diagonal_v2/tests/ut/op_kernel/test_fill_diagonal_v2_tiling.h, conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp, conversion/fills/tests/ut/op_host/test_fills_infershape.cpp
    • clang-format — Failed(自动格式化了以下文件): conversion/fill_diagonal_v2/tests/ut/op_kernel/test_fill_diagonal_v2_tiling.h, conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp, conversion/fill_v2/op_graph/fill_v2_proto.h, conversion/fills/tests/ut/op_host/test_fills_infershape.cpp, conversion/identity_n/op_graph/identity_n_proto.h
  • 根因证据(日志原文):
[2026-10-22 16:00:04.468+08:00] trim trailing whitespace.................................................Failed
[2026-10-22 16:00:04.471+08:00] - files were modified by this hook
[2026-10-22 16:00:04.473+08:00] Fixing conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp
[2026-10-22 16:00:04.475+08:00] fix end of files.........................................................Failed
[2026-10-22 16:00:04.480+08:00] Fixing conversion/fill_diagonal_v2/tests/ut/op_kernel/test_fill_diagonal_v2_tiling.h
[2026-10-22 16:00:04.492+08:00] clang-format.............................................................Failed
[2026-10-22 16:00:04.493+08:00] - hook id: clang-format
[2026-10-22 16:00:04.494+08:00] - files were modified by this hook
[2026-10-22 16:00:04.496+08:00] Formatting [1/4] conversion/fill_diagonal_v2/tests/ut/op_kernel/test_fill_diagonal_v2_tiling.h
[2026-10-22 16:00:04.497+08:00] Formatting [2/4] conversion/fill_diagonal_v2/tests/ut/op_host/test_fill_diagonal_v2_infershape.cpp
[2026-10-22 16:00:04.498+08:00] Formatting [3/4] conversion/fill_v2/op_graph/fill_v2_proto.h
[2026-10-22 16:00:04.499+08:00] Formatting [4/4] conversion/fills/tests/ut/op_host/test_fills_infershape.cpp
[2026-10-22 16:00:04.500+08:00] Formatting [1/1] conversion/identity_n/op_graph/identity_n_proto.h
[2026-10-22 16:00:04.568+08:00] ::error::precommit.py 异常退出: exit code=1, signal=null
结构化定界摘要
[{"repo": "ops-math", "run_number": 5537, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误",
  "Failed_Reason": "CodeCheck_precommit 的 pre-commit 检查失败: clang-format、trim trailing whitespace、fix end of files 三个 hook 不通过, 涉及 fill_diagonal_v2/fill_v2/fills/identity_n 的 5 个变更文件存在代码格式不符、行尾空白、文件末尾换行问题",
  "evidence": "clang-format.............................................................Failed",
  "suggestion": "通知 PR 提交者本地执行 pre-commit run --files <变更文件> 自动修复格式后重新推送",
  "jobs": "CodeCheck_precommit"}]

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

likedislike
TangPCTangPCCollaborators
19 days ago Pre merge succeeded (commit_id: f841ce88240f440b9ac3e1656f968b26a6165350)
TangPCTangPCCollaborators
19 days ago Force-pushed 1 commits:33074953-docs: 修复注释与文档不一致(fill_diagonal_v2、fill_v2、fills 等 文件注释)
TangPCTangPCCollaborators
19 days ago Pre merge succeeded (commit_id: fbd535024a89931536a42df127dd1c76f02dc2e6)
CANN-robotCANN-robotCollaborators
19 days ago Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
19 days ago Added label: cann-cla/yes
TangPCTangPCCollaborators
19 days ago Modify description of pull request
TangPC
TangPCCollaborators
19 days ago Comments:

compile

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

/approve

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