Merged
fused_infer_attention_score算子arch38下host侧Tiling代码重构 #16968
HuLinjieAdd on 4 days ago
fused_infer_attention_score算子arch38下host侧Tiling代码重构 #16968
Merged
HuLinjieAdd on 4 days ago
HuLinjie
HuLinjie
4 days ago

描述

fused_infer_attention_score 算子的 arch38 分支 host 侧 Tiling 代码存在历史遗留的解引用崩溃隐患、安全红线问题及 TOPN 等问题;同时,Tiling 逻辑集中在单个文件中,文件代码行数超过 5000 行,且单个函数行数多、参数多、圈复杂度高,导致整体复杂度高、职责混杂,可读性与可维护性较差。
从而进行重构:

  • 消除历史解引用崩溃隐患,提升算子稳定性;
  • 降低函数复杂度,按职责拆分 Tiling 逻辑,提升代码可读性与可维护性;
  • 便于后续 arch38 分支的功能扩展与问题定位。

关联的Issue

关联Issue:#8673 https://gitcode.com/cann/ops-transformer/issues/8673
关联Issue:#8299 https://gitcode.com/cann/ops-transformer/issues/8299

测试

FIA Arch38下原有的所有泛化用例 + 新增的泛化用例

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for HuLinjie's contribution.)
HuLinjieHuLinjie
4 days ago Created pull request, commit f6a3efd5
CANN-robotCANN-robotCollaborators
4 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
4 days ago 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
attention ✅ 蒋礼锐, wangzhe123456789 (2/2) ✅ 蒋礼锐 (1/1)
common ✅ 蒋礼锐, wang-minbo (2/2) ✅ wang-minbo, 蒋礼锐 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
4 days ago Set guijianwei,hz36amy_00,yangziqi_007,coder_linx,cheng_zhiwei,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,huang-wei-chen,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,xuchengyang,shen_weiling,gaoxiang618,songjionghui,lining_210,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,Julius47,yuhao_,L_Euler,wangxun21 as approver
CANN-robotCANN-robotCollaborators
4 days ago Set guijianwei,hz36amy_00,yangziqi_007,coder_linx,cheng_zhiwei,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,huang-wei-chen,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,xuchengyang,shen_weiling,gaoxiang618,songjionghui,lining_210,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,Julius47,yuhao_,L_Euler,wangxun21 as approver
92 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
2 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
2 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
2 days ago Added label: ci-pipeline-passed
CANN-robotCANN-robotCollaborators
2 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
2 days ago Merged pull request