Merged
fix(operation): Force update dynValidShape for OP_CONTRACT output #6205
zhaosenqiuAdd on Sep 11
fix(operation): Force update dynValidShape for OP_CONTRACT output #6205
Merged
zhaosenqiuAdd on Sep 11
zhaosenqiu
zhaosenqiuCollaborators
Sep 11

fix(operation): Force update dynValidShape for OP_CONTRACT output

Original OP_ASSEMBLE carried both view and transport semantics, and the
transport semantics is now split into OP_CONTRACT. The dynValidShape
force-update whitelist in InferShapeRegistry::CallInferShapeFunc only
covered OP_COPY_OUT and OP_ASSEMBLE, so an OP_CONTRACT whose output
tensor already holds a stale dynValidShape inherited from its input is
never refreshed against the real output shape.

With enable_slice enabled, the stale dynValidShape on the L0C-to-L1
contract output blocks RemoveRedundantOp from eliminating the identity
L1-to-L1 view. The surviving view becomes the direct consumer of the
contract, which defeats the cube-local-load skip in the partitioner's
L1CopyInCombine rule and transitively merges the whole tile chain into
a few oversized subgraphs, producing 14k-line CCE files and extremely
long codegen time.

Changes:

Add OP_CONTRACT to the dynValidShape force-update condition in
CallInferShapeFunc, so CONTRACT outputs are handled exactly like
ASSEMBLE outputs
Verified: subgraph count is restored from 4 to 90, CCE file size
shrinks from 14391 lines to about 936 lines, codegen finishes in
seconds instead of timing out, and all fp16/fp32 combinations with
enable_slice on/off pass precision checks
Related Issues: #3267
pr6162合入商分

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for zhaosenqiu's contribution.)
zhaosenqiuzhaosenqiuCollaborators
Sep 11 Created pull request, commit 40d9e61d
zhaosenqiuzhaosenqiuCollaborators
Sep 11 Associated issue: [Bug-Report|缺陷反馈]: A5 slice和token开关开启之后,2C1V构图场景引入新的报错SYMBOL_NOT_FOUND. failed to query by identifier: alloc identifier <buf_type=L1
CANN-robotCANN-robotCollaborators
Sep 11 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 11 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, zhangyuebing (2/2) ✅ xinweiliu (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
zhaosenqiu
zhaosenqiuCollaborators
Sep 11 Comments:

compile

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 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
zhaosenqiuzhaosenqiuCollaborators
Sep 11 Pre merge succeeded (commit_id: 8e7b3dee956f8b4015c3f7ff5a19c1aa17595d20)
CANN-robotCANN-robotCollaborators
Sep 11 Set xinweiliu,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,yinjie27_,tsungl4,make_pto,linjiashu as approver
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-running
zhaosenqiuzhaosenqiuCollaborators
Sep 11 Modify description of pull request
CANN-robotCANN-robotCollaborators
Sep 11 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-passed
xinweiliu
xinweiliuCollaborators
Sep 11 Comments:

/lgtm

likedislike
xinweiliu
xinweiliuCollaborators
Sep 11 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: approved
zhangyuebing
zhangyuebingCollaborators
Sep 11 Comments:

/approve

likedislike
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
zhangyuebing

likedislike
zhangyuebing
zhangyuebingCollaborators
Sep 11 Comments:

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

likedislike
zhangyuebing
zhangyuebingCollaborators
Sep 12 Comments:

/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Sep 12 Added label: lgtm
CANN-robotCANN-robotCollaborators
Sep 12 Merged pull request