Merged
fix(opration): Repair Alerts #6371
zhangchenAdd on Sep 16
fix(opration): Repair Alerts #6371
Merged
Merged fromchen_zhang/pyptoFIX_WARNINGSintocann/pypto9.2.0
Pull Request has been successfully merged by CANN-robot.
(Thank you for zhangchen's contribution.)Sep 16 Associated issue: pr告警修复
atomgit-bot
Sep 16 Comments:
Sep 16 Comments:
变更摘要
本 PR 旨在修复卷积算子实现中的编译告警(Alerts),主要方式是对 conv_operation_impl.cpp 和 conv_load_nz2nz_impl.h 中的大函数进行拆分与抽取,将形状计算、偏移计算等逻辑提取为独立静态辅助函数,以降低函数复杂度、消除重复代码。涉及 Conv1D 结果张量构造、Conv1D 输入输出 reshape、Fmap/Weight 的 L1 加载与 CopyOut 分块逻辑的重构,以及 Conv3D NZ2NZ 加载函数按 fmap/weight 拆分,整体为无行为变更的代码整理。
主要改动
- 抽取 Conv1D 结果张量构造逻辑:新增静态函数
ConstructConv1DResTensor,将ConstructTensorGraphNZ2NZ中原本内联的 Conv1D 结果张量由 NC1HWC0 重塑为 3 维输出的逻辑(含OP_RESHAPE算子创建、isConv/groupReshapeNoSplit属性设置)提取为独立函数并复用。 - 抽取 Conv1D 输入输出 reshape 逻辑:新增静态函数
ConstructConv1DOperandReshape(将 fmap/weight 升维为 4 维、输出降维为 NCL)与AddConv1DOutReshapeOp(对 Conv1D 输出执行OP_RESHAPE),替换ConstructTensorGraph中内联的重复实现。 - 重构
SetCopyInAL1Op/SetCopyInBL1Op:将 GM 源数据偏移与形状计算分别抽取为CalFmapSrcGmInfo/CalWeightSrcGmInfo,并将原先按平台分支分别设置的copyInMode属性收敛为一条基于IsArch32Platform()的三元表达式(COPY_MOD_NZ2NZ/COPY_MOD_DN2NZ)。 - 重构 L1 tile 与 CopyOut 形状计算:将
ConstructFmapL1Tile/ConstructWeightL1Tile中的 L1 目标形状与 GM 有效形状计算抽取为CalFmapL1Shapes/CalWeightL1Shapes,将ConstrucCopyOutTile中的 L0C 结果形状与动态有效形状计算抽取为CalL0CTileResShape。 - 拆分 Conv3D NZ2NZ 加载模板:在
conv_load_nz2nz_impl.h中将原单一模板TLoadConv3DNZ2NZ拆分为TLoadConv3DFmapNZ2NZ(NDC1HWC0 布局)与TLoadConv3DWeightNZ2NZ(FRACTAL_Z_3D 布局),原模板改为按isFmap模板参数分发调用。


Incorrect?
atomgit-bot
Sep 16 Comments:
Sep 16 Comments:
Sep 16 Added label: cann-cla/yes
zhangchen
Sep 16 Comments:
Sep 16 Comments:
compile


CANN-robot
Sep 16 Comments:
Sep 16 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 |
|---|---|---|
| framework/src/interface/operation | ✅ xinweiliu, dai-zhentao (2/2) | ✅ xinweiliu (1/1) |
| framework/src/interface/tileop/conv | ✅ xinweiliu, dai-zhentao (2/2) | ✅ xinweiliu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
chen_zhang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Sep 16 Pre merge succeeded (commit_id: 1e3adcf764ebfc2641189183ea526ff286c23504)
Sep 16 Set xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
Sep 16 Set xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
Sep 16 Set xinweiliu,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,yinjie27_,tsungl4,make_pto,linjiashu as approver
Sep 16 Set xinweiliu,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,yinjie27_,tsungl4,make_pto,linjiashu as approver
CANN-robot
Sep 16 Comments:
Sep 16 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 16 Added label: ci-pipeline-running
Sep 16 Removed label: ci-pipeline-running
Sep 16 Added label: ci-pipeline-passed
dai-zhentao
Sep 17 Comments:
Sep 17 Comments:
/lgtm


xinweiliu
Sep 18 Comments:
Sep 18 Comments:
/approve


Sep 18 Added label: lgtmapproved
Sep 18 Merged pull request
fix(opration): Repair Alerts
issue:https://gitcode.com/cann/pypto/issues/3314