Merged
新增算子generic_block_sparse_attetnion #10628
新增算子generic_block_sparse_attetnion #10628
Merged
WangJinChengAdd on Aug 25
WangJinCheng
WangJinChengCollaborators
Aug 25

描述

新增 generic_block_sparse_attention 稀疏注意力算子,支持沿着 S 轴任意粒度的块稀疏模式。通过 sparseBlockIdx 指定每个 Q 块选择的 KV 块索引, sparseBlockCount 指定每个 Q 块保留的 KV 块数量,实现高效的稀疏注意力计算。须先调用 aclnnGenericBlockSparseAttentionMetadata 生成 metadata 后再调用主算子。

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for WangJinCheng's contribution.)
WangJinChengWangJinChengCollaborators
Aug 25 Created pull request, commit adb5a9bf
atomgit-bot
atomgit-bot
Aug 25 Comments:

🤖 正在生成合并请求摘要,请稍候…

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Aug 25 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Aug 25 Comments:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robotCollaborators
Aug 25 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 ✅ 蔡雯雯, 黄俊健, 刘丹 (3/2) ✅ 蔡雯雯 (1/1)
*/*/docs/acl*.md ✅ 刘丹, 蔡雯雯, 黄俊健 (3/2) ✅ 蔡雯雯 (1/1)
*/*/op_host/*_def.cpp ✅ 汤磊, 黄俊健, 刘丹 (3/2) ✅ 汤磊 (1/1)
*/*/op_host/op_api/aclnn*.h ✅ 汤磊, 黄俊健, 刘丹 (3/2) ✅ 汤磊 (1/1)
attention ✅ 刘丹, 黄俊健 (2/2) ✅ 刘丹 (1/1)
cmake ✅ wang-minbo, 刘丹, 黄俊健 (3/2) ✅ wang-minbo, 刘丹 (2/1)
docs ✅ wang-minbo, 刘丹, 黄俊健 (3/2) ✅ 刘丹, wang-minbo (2/1)
scripts ✅ 黄俊健, 刘丹, wang-minbo (3/2) ✅ 刘丹, wang-minbo (2/1)
tests ✅ 黄俊健, wang-minbo, 刘丹 (3/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

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

likedislike
461 messages are collapsed here。 See more
monologue815
monologue815Collaborators
Aug 31 Comments:

/lgtm

likedislike
liudan12
liudan12Collaborators
Aug 31 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Aug 31 Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
Aug 31 Closed associated issue
CANN-robotCANN-robotCollaborators
Aug 31 Merged pull request