已合并
chore: 整理 BatchNormGradV3 文档、许可证头与格式 #12098
chore: 整理 BatchNormGradV3 文档、许可证头与格式 #12098
已合并
qianzehong创建于 14 天前
qianzehong成员
14 天前

描述

BatchNormGradV3 的目录说明仍称尚无 Ascend C 实现,部分交付文件的许可证头和格式也无法通过当前 pre-commit 门禁。本 PR 更正算子列表及 README,统一主线中 18 个旧式许可证头,保留原版权年份与所有者;清理未使用导入、Python 格式及文件末尾换行。

共修改 23 个文件。除移除两条未使用导入外,源码和数据生成/比较逻辑保持不变。本 PR 从最新 master 独立分支,不包含 output_mask 功能或错误码、tiling 布局修复。

建议合入顺序:本维护 PR → outputMask 错误码修复 → tiling/UT 一致性修复 → output_mask 功能 PR #11948。后续 PR 中为满足门禁所需的少量同文件许可证修正与本 PR 一致。

关联的Issue

无。

测试

  • 对全部 23 个变更文件执行仓库 pre-commit:通过(包含 clang-format、Ruff、基础格式检查和 OAT)。
  • 对主线算子目录全部 75 个已跟踪文件运行 OAT:0 个许可证/文件类型问题,退出码 0。
  • 核对 C++/CMake 非注释内容、JSON 数据及 Python AST:无逻辑变化;Python AST 仅移除了明确未使用的 OpsDataset、numpy 导入。
  • git diff --check:通过。纯维护修改,未重跑设备精度/性能测试。

文档更新

更正 docs/zh/op_list.md 中 batch_norm_grad_v3 行和算子 README 的交付说明,README 补充接口文档链接。

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 qianzehong 的贡献)
Qqianzehong成员
14 天前 创建了 pull request,commit 0fd42e99
atomgit-bot
atomgit-bot
14 天前 评论:

变更摘要

本 PR 是面向 BatchNormGradV3 算子的维护性改动,主要围绕文档更正、许可证头统一与代码格式整理展开,源码与数据生成/比较逻辑保持不变(仅移除未使用导入)。改动对主线中多个旧式许可证头文件统一为新版 CANN Open Software License Agreement Version 2.0 头,保留原版权年份与所有者;清理 executor_aclnnBatchNormBackward.py 中的未使用导入;对若干 Python 脚本执行格式规范(长行换行、引号与空行统一、文件末尾换行);并更正算子目录交付说明与接口文档链接。

主要改动

  • 许可证头统一: 对 test_aclnn_batch_norm_backward.cpp、test_batch_norm_grad_v3_infershape.cpp、test_batch_norm_grad_v3_tiling.h、batch_norm_grad_v3_tiling_def.h、test_batch_norm_grad_v3.cpp 及多个 Python 脚本等文件,将旧式许可证头(如 This file is a part of the CANN Open Software. 与分散的免责声明)替换为合并后的新版措辞,保留 Copyright (c) 2025 Huawei Technologies Co., Ltd. 与 License Agreement Version 2.0。

  • 移除未使用导入: 在 executor_aclnnBatchNormBackward.py 中删除 from atk.tasks.dataset.base_dataset import OpsDataset 与 import numpy as np 两条未使用导入。

  • Python 格式整理: 对 gen_data.py、gen_tiling.py、compare_data.py 及 executor_aclnnBatchNormBackward.py 进行格式规范,包括将长的 torch.ops.aten.native_batch_norm_backward(...) 调用与字典字面量拆行、统一使用双引号、函数间补空行、__main__ 判断统一为双引号形式等,逻辑不变。

  • 文件末尾换行修正: 为 batch_norm_grad_v3_base_tiling.h、batch_norm_grad_v3.cpp、batch_norm_grad_v3_tiling_def.h、compare_data.py、gen_data.py 等文件补齐文件末尾换行,消除 "No newline at end of file"。

  • 文档更正: 依据 PR 描述,更正 docs/zh/op_list.md 中 batch_norm_grad_v3 行及算子 README 的交付说明,并在 README 中补充接口文档链接。


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

likedislike
不准确?
atomgit-bot
atomgit-bot
14 天前 评论:

代码审查

✅ 未发现问题


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

likedislike
不准确?
CANN-robotCANN-robot成员
14 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
14 天前 评论:

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
*/*/README.md ✅ 杨露, 汤平川, 陈展熹 (3/2) ✅ 杨露 (1/1)
docs ✅ 杨露, 汤平川 (2/2) ✅ 杨露 (1/1)
norm ✅ 陈展熹, 汤平川 (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-robot成员
14 天前 评论:

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
14 天前 将zengjuan,u010470851,chaotang233,kevin_huang1234,crystalhu,yangyang016,fanqirui,gitee-duhuiping,wangrui_,renruhai,su-yueming,zhajianqing123,yourealize,chenqi317,wang-xing001,liubo75,tangweiwei2,gitcode-chenjiao,chenxingyu18,liujie12345678,pingchuantang,Chen_HaoWen,fengying555682,caiwenwen,yanglu-1设为评审人
CANN-robotCANN-robot成员
14 天前 将u010470851,kevin_huang1234,gitee-duhuiping,wangrui_,renruhai,su-yueming,zhajianqing123,yourealize,wang-xing001,gitcode-chenjiao,chenxingyu18,liujie12345678,pingchuantang,Chen_HaoWen,fengying555682,caiwenwen,yanglu-1设为审查人
qianzehong成员
14 天前 评论:

compile

likedislike
Qqianzehong成员
14 天前 预合并成功(commit_id: 5a9c5dca5cc5952de433dc35be0afcf76d4ce88f)
CANN-robot
CANN-robot成员
14 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-passed
陈展熹成员
14 天前 评论:

/lgtm
/approve

likedislike
yanglu-1成员
14 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:approved
TangPC
TangPC成员
14 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:lgtm
CANN-robotCANN-robot成员
14 天前 合入了pull request