已合并
fix: 补齐 BatchNormGradV3 tiling 注册与 UT 数据布局 #12100
fix: 补齐 BatchNormGradV3 tiling 注册与 UT 数据布局 #12100
已合并
qianzehong创建于 6 天前
qianzehong成员
6 天前

描述

BatchNormGradV3 的 RASplitR 融合键 51000000/52000000 缺少 TilingData 注册,按键查询时会回退到仅含 dummy 字段的默认结构。Kernel UT 镜像还缺少完整的 RASplitR 结构,以及 RARSplitCoreR1 的 7 个 binAdd 字段和 2 个 r0TailAligned 字段。

为两个融合键注册 BatchNormGradV3RASplitRTilingData,并按 Host 的字段类型和顺序补齐 UT 镜像;同步规范被修改镜像文件的许可证头和结尾换行。此修改修正注册元数据及测试数据布局,不改变生产 Kernel 的切分、计算或输出。

本 PR 基于最新 master,尚无 outputMask 字段:RASplitR 序列化大小为 184 字节,RARSplitCoreR1 为 408 字节。建议在维护和错误码修复后、output_mask 功能 PR #11948之前合入。#11948 后续同步本 PR 时,应在这两个 UT 镜像的末尾保留/补充 outputMask,使其分别变为 192/416 字节;不得将 mask 放在 binAdd 字段之前。

相关拆分 PR:cleanup PR #12098;error PR #12099。

关联的Issue

无。

测试

  • CANN 9.2,bash build.sh -u --ophost --ops=batch_norm_grad_v3 --soc=ascend950 --ut_mode=fast -j8:38 个 Host UT 全部通过。
  • 使用真实 Host 定义及 SDK 注册库编译探针:50000000/51000000/52000000 均查询到正确的 184 字节结构,1000 查询到 408 字节结构。
  • Host SaveToBuffer → UT InitTilingData 往返检查通过:RASplitR 的 23 个标量字段、RARSplitCoreR1 展开嵌套结构后的 51 个字段,逐字段类型/偏移和值一致。
  • 对全部 2 个变更文件执行仓库 pre-commit、git diff --check:通过。
  • 未启用原先注释的 Kernel 用例,未新增两个分支的设备数值 UT;本轮不宣称复现或修复了设备计算故障。

文档更新

无。

类型标签

AI/Agent生成声明

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

变更摘要

本 PR 修复 BatchNormGradV3 的 RASplitR 融合键 51000000/52000000 缺少 TilingData 注册的问题:原先按键查询会回退到仅含 dummy 字段的默认结构,现为这两个键补充注册 BatchNormGradV3RASplitRTilingData。同时补齐 Kernel UT 镜像中的 RASplitR 结构、RARSplitCoreR1 的 binAdd 与 r0TailAligned 字段,并规范被修改镜像文件的许可证头与结尾换行。该改动仅修正注册元数据与测试数据布局,不改变生产 Kernel 的切分、计算或输出。

主要改动

  • 补注册两个融合键的 TilingData 结构: 在 batch_norm_grad_v3_tiling.h 中新增 REGISTER_TILING_DATA_CLASS(BatchNormGradV3_51000000, BatchNormGradV3RASplitRTilingData) 与 REGISTER_TILING_DATA_CLASS(BatchNormGradV3_52000000, BatchNormGradV3RASplitRTilingData),使按键查询能命中正确的 184 字节结构而非默认结构。
  • 新增 UT 镜像的 RASplitR 结构定义: 在 batch_norm_grad_v3_tiling_def.h 中补充 BatchNormGradV3RASplitRTilingData 结构,包含 rDim、aDim、usedCoreNum、cacheBuffCnt 等 23 个 int64_t 字段,字段类型与顺序对齐 Host 定义。
  • 补齐 RARSplitCoreR1 的 r0TailAligned 字段: 在 BatchNormGradV3RARSplitCoreR1TilingData 中按位置插入 r0TailAlignedStg0 与 r0TailAlignedStg2 两个字段。
  • 补齐 RARSplitCoreR1 的 binAdd 字段: 在结构尾部追加 binAddBasicBlockLoop、binAddMainFoldCount、binAddCacheBufferCount、binAddResultCacheID、lastCoreBinAddBasicBlockLoop、lastCoreBinAddMainFoldCount、lastCoreBinAddResultCacheID 共 7 个字段。
  • 规范镜像文件格式: 更新 batch_norm_grad_v3_tiling_def.h 的许可证头文本,并在文件末尾补回换行。

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

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

代码审查

✅ 未发现问题


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

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

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
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成员
6 天前 评论:

CLA Signature Pass

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

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

compile

likedislike
Qqianzehong成员
6 天前 推送了提交
CANN-robot
CANN-robot成员
6 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-passed
陈展熹成员
6 天前 评论:

/lgtm
/approve

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

/lgtm
/approve

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