Merged
feature: support topK from 1 to 9182 in CSA mode #11899
feature: support topK from 1 to 9182 in CSA mode #11899
Merged
Yuan BinAdd on Sep 12
Yuan Bin
Yuan BinCollaborators
Sep 12

描述

改动原因

为CSA模式添加topK的[1,8192]的泛化,使其支持更广泛的索引数范围。

改动方法

放宽对sparse_flash_mla_meta中cmpTopk的拦截条件,在sparse_flash_mla中增加对cmp_sparse_indices中最后一维的长度检查。在sparse_flash_mla的v0阶段中中使s2进行正常的完整循环和获取循环长度。

关联的Issue

https://gitcode.com/cann/ops-transformer/issues/5261

测试

经过360条白盒泛化测试用例,以及200条泛化前后的性能测试

文档更新

更新了sparse_flash_mla与sparse_flash_mla_meta的README文档与接口文档,更新了topK的合法与拦截的范围。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for Yuan Bin's contribution.)
Yuan BinYuan BinCollaborators
Sep 12 Created pull request, commit dc9a65de
Yuan BinYuan BinCollaborators
Sep 12 Associated issue: [Requirement|需求建议]:SMLA算子支持topk泛化1~8192
CANN-robotCANN-robotCollaborators
Sep 12 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 12 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
*/*/README.md ✅ 杨露, wangxun21, kdy18482276080, 蔡雯雯 (4/2) ✅ 蔡雯雯, 杨露 (2/1)
*/*/docs/acl*.md ✅ 杨露, wangxun21, kdy18482276080, 蔡雯雯 (4/2) ✅ 蔡雯雯, 杨露 (2/1)
attention ✅ kdy18482276080, wangxun21 (2/2) ✅ kdy18482276080 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 12 Set guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,gitee-duhuiping,claire8090,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,gitcode-chenjiao,cc-z,kdy18482276080,shen_weiling,Ww7012,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,fengying555682,zzy__,Julius47,yuhao_,L_Euler,wangxun21,caiwenwen,yanglu-1 as approver
77 messages are collapsed here。 See more
wangxun21
wangxun21Collaborators
Sep 15 Comments:

/lgtm

likedislike
caiwenwen
caiwenwenCollaborators
Sep 15 Comments:

/lgtm
/approve

likedislike
kdy18482276080
kdy18482276080Collaborators
Sep 15 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 15 Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
Sep 15 Merged pull request