Merged
fix(function): Preserve normalized reshape copy valid shape #6683
赵俊涵Add on Sep 23
fix(function): Preserve normalized reshape copy valid shape #6683
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for 赵俊涵's contribution.)atomgit-bot
Sep 23 Comments:
Sep 23 Comments:
变更摘要
本 PR 修复 reshape_copy 的 validshape 在归一化后未写回属性、导致动态 shape 尾块可能出现精度错误的问题。核心是让 MaybeNormalizeValue 在归一化时同步保存归一化后的结果,并在 NormalizeCoaForSpecialInfo 中将归一化后的 validshape 写回 RESHAPE_COPY_IN/RESHAPE_COPY_OUT 属性;同时卷积专用 Copy 改为收集 COA 参数时使用原始 validshape,避免影响卷积用例。
主要改动
MaybeNormalizeValue回写归一化结果: 将循环改为遍历values引用,并在函数末尾通过opImmList = OpImmediate::Specified(values)把归一化后的值写回传入的opImmList,使调用方拿到归一化后的validshape。NormalizeCoaForSpecialInfo写回归一化后的validshape: 针对IsReshapeCopyIn/IsReshapeCopyOut分支,将SetFromDynValidShape/SetToDynValidShape的参数由OpImmediate::Specified(coaList)改为validshape,即写回归一化后的属性值。- 卷积专用 Copy 保持原始
validshape: 在NormalizeCopyIn的OP_L1_COPY_IN_CONV分支与NormalizeCopyOut的OP_L0C_COPY_OUT_CONV分支中,MaybeNormalizeValue的valueToIndex参数由变量改为常量false,使卷积场景仍收集 COA 参数并写回原始validshape。


Incorrect?
atomgit-bot
Sep 23 Comments:
Sep 23 Comments:
Sep 23 Added label: cann-cla/yes
CANN-robot
Sep 23 Comments:
Sep 23 Comments:
CANN-robot
Sep 23 Comments:
Sep 23 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 |
|---|---|---|
| 9.2.0 | ✅ gcw_kUomxQ2l, DCGDDD (2/2) | ✅ gcw_kUomxQ2l (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


Sep 23 Set xinweiliu,cam_bxh,dai-zhentao,TianXL,lululu40888,shi-dingkun,gguuaanngg,codehjp423,jiangtao_rts,gitcode-chenjiao,hanxiaolong,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,gcw_kUomxQ2l,Andy-lb,WenboCodes as approver
Sep 23 Set xinweiliu,cam_bxh,dai-zhentao,TianXL,lululu40888,shi-dingkun,gguuaanngg,codehjp423,jiangtao_rts,gitcode-chenjiao,hanxiaolong,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,gcw_kUomxQ2l,Andy-lb,WenboCodes as approver
Sep 23 Set TianXL,jiangtao_rts,gitcode-chenjiao,hanxiaolong,gcw_kUomxQ2l,Andy-lb as approver
Sep 23 Set TianXL,jiangtao_rts,gitcode-chenjiao,hanxiaolong,gcw_kUomxQ2l,Andy-lb as approver
赵俊涵
Sep 23 Comments:
Sep 23 Comments:
/compile


Sep 23 Pre merge succeeded (commit_id: bf104250269d989a9c42d7aca8c8943a705429cc)
CANN-robot
Sep 23 Comments:
Sep 23 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 23 Added label: ci-pipeline-running
5 event messages are collapsed here。 See more
Sep 23 Added label: AscendC-SUCC
杨旭
Sep 24 Comments:
Sep 24 Comments:
/lgtm
/approve


liulun0308
Sep 24 Comments:
Sep 24 Comments:
/approve


CANN-robot
Sep 24 Comments:
Sep 24 Comments:
The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: DCGDDD


Sep 24 Added label: lgtmapproved
Sep 24 Merged pull request
问题:
reshape_copy 的 validshape 归一化后未写回属性,导致动态 shape 尾块可能出现精度错误。
修改:
保存归一化后的 validshape 并写回 RESHAPE_COPY_IN/OUT 属性。卷积专用 Copy 仍收集 COA 参数并写回原始 validshape,避免影响卷积用例。