已合并
conv2d A16W8 InnerBatch LoadAL1 bug fix #7767
conv2d A16W8 InnerBatch LoadAL1 bug fix #7767
已合并
xinweiliu创建于 7月21日
xinweiliu
xinweiliu
7月21日

描述

A16W8 场景 innerbatch,HW模式下LoadAL1的 DN2NZ指令loop4 dst stride配置使用的k0错误,需要使用fmap对应dtype的k;

关联的Issue

#4206

测试

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xinweiliu 的贡献)
xinweiliuxinweiliu
7月21日 创建了 pull request,commit 9e97f24e
xinweiliuxinweiliu
7月21日 关联了issue:[Bug-Report|缺陷反馈]: Conv2D onemodel网络泛化用例,A16W8伪量化场景精度失败
atomgit-bot
atomgit-bot
7月21日 评论:

变更摘要

此 PR 修复了 A16W8 场景下 InnerBatch 模式的 LoadAL1 指令中 DN2NZ 操作的一个 bug。在 HW 分块模式下,DN2NZ 指令 loop4 的 dst stride 配置错误地使用了通用对齐参数 Intf::k0,应改为使用 fmap 对应 dtype 的对齐参数 Intf::k0FmapTail。此变更将两个文件中所有相关的 dstNzMatrixStride 计算及 Load3DSetFMatrixCal 调用中的 k0 统一替换为 k0FmapTail,同时附带少量代码格式化调整。

主要改动

  • dstNzMatrixStride 对齐参数修正(conv2d_v2_instr_base_impl.h: 在 SetDn2NzIntriParamsSetNd2NzC04IntriParamsSetDn2NzC04IntriParams 等多个函数中,将 dstNzMatrixStride 计算所用的对齐基数从 Intf::k0 改为 Intf::k0FmapTail,确保 innerBatch 与非 innerBatch 场景下 stride 均按 fmap dtype 正确对齐。
  • Load3DSetFMatrixCal 对齐参数修正(conv2d_v2_instr_base_impl.h: 在 NCHW+C04 格式的 innerBatch 分支中,Load3DSetFMatrixCalAlignB 对齐参数从 Intf::k0 改为 Intf::k0FmapTail,使 3D Load 的 fmatrix 计算使用正确的 dtype 对齐。
  • dstNzMatrixStride 对齐参数修正(conv2d_v2_instr_impl.h: 在 SetDn2NzIntriParamsSetNd2NzIntriParamsInputHWNCSetNd2NzIntriParamsC04InputHWNC 等函数中,将 dstNzMatrixStride 的乘数从 Intf::k0 改为 Intf::k0FmapTail,修复 HW 模式下 DN2NZ dst stride 的对齐错误。
  • 代码格式化(双文件): 对部分长行进行换行对齐,修正引用符号位置(如 Nd2NzParams &intriParamsNd2NzParams& intriParams),并修复文件末尾缺失的换行符。
likedislike
atomgit-bot
atomgit-bot
7月21日 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
7月21日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
7月21日 评论:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
7月21日 评论:

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


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
conv 王慈孟, 郑李磊 (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

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

likedislike
CANN-robotCANN-robot成员
7月21日 将zengjuan,cheng_gao,crystalhu,yangyang016,fanqirui,chenqi317,lileizheng,liubo75,LiuZonggu,tangweiwei2,wangcimeng,huafeng793,shenchengzong,yuxin5设为评审人
CANN-robotCANN-robot成员
7月21日 将cheng_gao,lileizheng,LiuZonggu,wangcimeng,huafeng793,shenchengzong,yuxin5设为审查人
xinweiliu
xinweiliu
7月21日 评论:

compile

likedislike
xinweiliuxinweiliu
7月21日 update merge request[project id: 7665709, iid: 7767, commit_id: d5fd4de5b5d98d20223e2b2bb4e44d125e6dba37] virtual merging success
CANN-robotCANN-robot成员
7月21日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月21日 评论:

流水线任务触发成功
任务链接 [75363fa58ecd43a3818fc0c003317d8f][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>

[2026-07-21 18:38:29]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月21日 评论:

流水线任务触发成功
任务链接 [13798240d81f45ec861148d086af0d9c][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ❌ FAILED >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
likedislike
xinweiliuxinweiliu
7月21日 update merge request[project id: 7665709, iid: 7767, commit_id: df4711a7cdd52333ef9e9db2fa68cce819e05cc1] virtual merging success
xinweiliuxinweiliu
7月21日 强制推送  1 个提交:07d0c925-A16W8_InnerBatch_LoadAL1
xinweiliuxinweiliu
7月21日 update merge request[project id: 7665709, iid: 7767, commit_id: 6d8b6e8025a72bc94aa37e7254bed6e2eebe5704] virtual merging success
xinweiliu
xinweiliu
7月21日 评论:

compile

likedislike
xinweiliuxinweiliu
7月21日 update merge request[project id: 7665709, iid: 7767, commit_id: 77478343d8c6728c2e8f88b8e979eaed693ccb2a] virtual merging success
CANN-robotCANN-robot成员
7月21日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月21日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月21日 添加了label:ci-pipeline-failed
CANN-robotCANN-robot成员
7月21日 删除了label:ci-pipeline-failed
CANN-robot
CANN-robot成员
7月21日 评论:

流水线任务触发成功
任务链接 [468711ff923f4c46af6cec0e1629c949][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_harmony-infer-chs-nn ✅ SUCCESS
UT_Test_harmony-infer-chs-nn-1 ✅ SUCCESS
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-07-21 19:13:47]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月21日 评论:

流水线任务触发成功
任务链接 [3a4ed26004a34801a9c39ac7ff858b34][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-07-21 18:41:57]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7月21日 添加了label:api-check-pass
CANN-robotCANN-robot成员
7月21日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月21日 添加了label:ci-pipeline-passed
lileizheng成员
7月21日 评论:

/reject

likedislike
conv2d_ci
7月21日 评论:
pipeline history
TimeNameResultLink
2026-07-21 19:13:37Start_PipelineMR_349
likedislike
conv2d_ci
7月21日 评论:
pipeline history
TimeNameResultLink
2026-07-21 19:16:28Sync_PR :white_check_mark: SUCCESSI6c8f31a
likedislike
conv2d_ci
7月21日 评论:
pipeline history
TimeNameResultLink
2026-07-21 19:16:48Trigger_SC :white_check_mark: SUCCESS20260721_192055537
likedislike
conv2d_ci
7月21日 评论:
pipeline history
TimeNameResultLink
2026-07-21 19:37:39CMETRICS :white_check_mark: SUCCESS>>>
likedislike
conv2d_ci
7月21日 评论:
pipeline history
TimeNameResultLink
2026-07-21 19:37:59Trigger_RDV :white_check_mark: SUCCESS20260721_194206873
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 10:14:36Trigger_SC :white_check_mark: SUCCESS20260722_101844985
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 10:36:24CMETRICS :white_check_mark: SUCCESS>>>
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 10:40:45commit2026-07-21T18:36:18+08:0007d0c925
Compile_Result :x: NOT_RUN
SC_Result :x: FAILURE>>>
RDV_Result:ALL :x: RUNNING>>>
本次未执行的rdv任务为
序号任务名未执行理由
11951DCNone
2davinci_tbe_mdcNone
3rdv_tbe_1951dc_01None
4rdv_tbe_1951lite_01None
5Smoke_1911mdc切换至br_feature_pegasus_v100r003c10b770_main
6rdv_tbe_1911rc_01暂时下线
7Smoke_nano暂无用例
8Smoke_nanoc11None
9rdv_tbe_1952_01None
10David该组的RDV疑似不需要运行:[rdv_tbe_david_01, rdv_tbe_david_02, rdv_tbe_david_03]
11transpose该组的RDV疑似不需要运行:[Davinci_RDV_conv_back_V121, conv_backward_1982_rdv, conv_backward_1971_rdv, conv_transpose_1952_rdv]
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 11:05:40Trigger_SC :white_check_mark: SUCCESS20260722_110948611
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 11:33:39CMETRICS :white_check_mark: SUCCESS>>>
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 11:34:00Trigger_RDV :white_check_mark: SUCCESS20260722_113809282
likedislike
conv2d_ci
7月22日 评论:
pipeline history
TimeNameResultLink
2026-07-22 18:14:22commit2026-07-21T18:36:18+08:0007d0c925
Compile_Result :x: NOT_RUN
SC_Result :x: FAILURE>>>
RDV_Result:ALL :white_check_mark: SUCCESS>>>
本次未执行的rdv任务为
序号任务名未执行理由
11951DCNone
2davinci_tbe_mdcNone
3rdv_tbe_1951dc_01None
4rdv_tbe_1951lite_01None
5Smoke_1911mdc切换至br_feature_pegasus_v100r003c10b770_main
6rdv_tbe_1911rc_01暂时下线
7Smoke_nano暂无用例
8Smoke_nanoc11None
9rdv_tbe_1952_01None
10David该组的RDV疑似不需要运行:[rdv_tbe_david_01, rdv_tbe_david_02, rdv_tbe_david_03]
11transpose该组的RDV疑似不需要运行:[Davinci_RDV_conv_back_V121, conv_backward_1982_rdv, conv_backward_1971_rdv, conv_transpose_1952_rdv]
likedislike
lileizheng成员
7月23日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
7月23日 添加了label:approved
wangcimeng成员
7月23日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
7月23日 添加了label:lgtm
CANN-robotCANN-robot成员
7月23日 关闭了关联的issue
CANN-robotCANN-robot成员
7月23日 合入了pull request