Pull Request has been successfully merged by CANN-robot.
(Thank you for xinweiliu's contribution.)变更摘要
该 PR 修复 A2A3 Conv1d 分组(group)场景下 reshape 算子无法感知 group 属性、与 Transdata 算子 split 后无法推导正确 shape 关系的问题。核心思路是新增 group_reshape_no_split 标志位(OpAttributeKey::groupReshapeNoSplit):在 conv_operation_impl.cpp 构造图时,当 convAttrParam.groups > 1 为相关 reshape 算子打上该标志,并在 SplitReshape 拆分优化中遇到带此标志的 reshape 时跳过拆分,同时配套补充防御性检查和单元测试。
主要改动
- 新增
groupReshapeNoSplit属性键: 在operation.cpp/operation.h中为OpAttributeKey增加groupReshapeNoSplit = "group_reshape_no_split"常量,作为该标志位的统一标识。 - Conv 图构造阶段设置标志位: 在
conv_operation_impl.cpp的ConstructTensorGraphNZ2NZ与ConstructTensorGraph中,当convAttrParam.groups > 1时,为OP_RESHAPE算子(包括reshapeFmapOp、reshapeWeightOp、reshapeResOp)设置groupReshapeNoSplit属性。 - 标志位在展开阶段透传: 在
operation_impl.cpp中为TiledInnerReshape增加groupReshapeNoSplit参数并写入TILE_RESHAPE算子属性,ExpandOperationInto在处理OP_RESHAPE时读取该属性并透传,确保标志位在展开后不丢失。 - SplitReshape 跳过带标志的拆分: 在
split_reshape.cpp/split_reshape.h中新增groupReshapeNoSplitRawMagics_集合记录带标志的 reshape 输出,并在CheckReshapeSkip中检测到该标志时直接跳过 split reshape,避免错误推导 shape 关系。 - 存储边界防御及单元测试: 在
conv_store_nz2nz_impl.h的TStoreConv2DNZ2NZ中对realCutW <= 0提前返回,避免非法分块搬出;test_splitreshape.cpp新增两个用例,分别验证带标志的 reshape 在SPLIT_RESHAPEpass 中被跳过拆分、以及标志位能跨EXPAND_FUNCTIONpass 保留。


compile


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 | ✅ 尹杰, dai-zhentao (2/2) | ✅ 尹杰 (1/1) |
| framework/src/interface/tileop/conv | ✅ 尹杰, dai-zhentao (2/2) | ✅ 尹杰 (1/1) |
| framework/src/passes | ✅ dai-zhentao, zhangyuebing, 尹杰 (3/2) | ✅ zhangyuebing, 尹杰 (2/1) |
| repo-cann/pypto | ✅ zhangyuebing, 尹杰, dai-zhentao (3/2) | ✅ zhangyuebing, 尹杰 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies 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. 👍


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/reject


/approve


✅ 已将本 PR 下你提交的未解决检视意见标记为已解决(无未解决的检视意见)。


/approve


/lgtm


A2A3 Conv1d group场景,reshape算子感知不到group属性,与Transdata算子处理如果split会无法推导正确的shape关系