Merged
[GBSAG] Add A2/A3 Op generic_block_sparse_attention_grad and generic_block_sparse_attention_grad_metadata #11499
[GBSAG] Add A2/A3 Op generic_block_sparse_attention_grad and generic_block_sparse_attention_grad_metadata #11499
Merged
tramp-llAdd on Sep 8
tramp-ll
tramp-llCollaborators
Sep 8

描述

GenericBlockSparseAttentionGrad是通用块稀疏注意力的反向计算算子。依据sparseBlockIdx/sparseBlockCount(稀疏块索引表)定义的索引,仅在被选中的KV块上计算和传播梯度,支持动态、可变长的分块稀疏模式。
新增 GenericBlockSparseAttentionGrad 和 generic_block_sparse_attention_grad_metadata算子

关联的Issue

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

测试

开发自验证通过

文档更新

NA

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for tramp-ll's contribution.)
tramp-lltramp-llCollaborators
Sep 8 Created pull request, commit c9abdba4
atomgit-bot
atomgit-bot
Sep 8 Comments:

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

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

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robotCollaborators
Sep 8 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
*/*/op_host/*_def.cpp ✅ 黄俊健, 汤磊, 於欣洁, gaoxiang618 (4/2) ✅ 汤磊 (1/1)
attention ✅ 黄俊健, guijianwei, 於欣洁, gaoxiang618 (4/2) ✅ guijianwei, 於欣洁, gaoxiang618 (3/1)
scripts ✅ gaoxiang618, 黄俊健 (2/2) ✅ gaoxiang618 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robotCANN-robotCollaborators
Sep 8 Set guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,wang-minbo,tang-lei01,xtqh,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,wangyongguang,haijie_699874,zzy__,yuhao_,L_Euler,wangxun21 as approver
CANN-robotCANN-robotCollaborators
Sep 8 Set guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,wang-minbo,tang-lei01,xtqh,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,wangyongguang,haijie_699874,zzy__,yuhao_,L_Euler,wangxun21 as approver
tramp-ll
tramp-llCollaborators
Sep 8 Comments:

compile

likedislike
tramp-lltramp-llCollaborators
Sep 8 Pre merge succeeded (commit_id: c7e8c7eb883021c3eaf026fd9d5dce927b797cfd)
CANN-robot
CANN-robotCollaborators
Sep 8 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 8 Added label: ci-pipeline-running
atomgit-bot
atomgit-bot
Sep 8 Comments:

⚠️ 本次变更过大(47 个可审文件、9823 行,预估需 9 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 8 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 8 Added label: ci-pipeline-passed
tramp-lltramp-llCollaborators
Sep 8 Modify description of pull request
tramp-lltramp-llCollaborators
Sep 8 Modify description of pull request
tramp-lltramp-llCollaborators
Sep 8 Modify description of pull request
guijianwei
guijianweiCollaborators
Sep 8 Comments:

/approve

likedislike
於欣洁
於欣洁Collaborators
Sep 8 Comments:

/lgtm
/approve

likedislike
tramp-lltramp-llCollaborators
Sep 8 Removed approver mabing1118
gaoxiang618
gaoxiang618Collaborators
Sep 8 Comments:

/lgtm
/approve

likedislike
tang-lei01
tang-lei01Collaborators
Sep 8 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 8 Added label: approved
monologue815
monologue815Collaborators
Sep 8 Comments:

/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Sep 8 Added label: lgtm
CANN-robotCANN-robotCollaborators
Sep 8 Closed associated issue
CANN-robotCANN-robotCollaborators
Sep 8 Merged pull request