Merged
[GBSAG] Add A2/A3 Op generic_block_sparse_attention_grad and generic_block_sparse_attention_grad_metadata #11499
tramp-llAdd on Sep 8
[GBSAG] Add A2/A3 Op generic_block_sparse_attention_grad and generic_block_sparse_attention_grad_metadata #11499
Merged
Merged fromtramp-ll/ops-transformer9.2.0intocann/ops-transformer9.2.0
Pull Request has been successfully merged by CANN-robot.
(Thank you for tramp-ll's contribution.)atomgit-bot
Sep 8 Comments:
Sep 8 Comments:
🤖 正在生成合并请求摘要,请稍候…


Incorrect?
Sep 8 Added label: cann-cla/yes
CANN-robot
Sep 8 Comments:
Sep 8 Comments:
CANN-robot
Sep 8 Comments:
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
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


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
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
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
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
Sep 8 Comments:
Sep 8 Comments:
compile


Sep 8 Pre merge succeeded (commit_id: c7e8c7eb883021c3eaf026fd9d5dce927b797cfd)
CANN-robot
Sep 8 Comments:
Sep 8 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


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


Incorrect?
Sep 8 Removed label: ci-pipeline-running
Sep 8 Added label: ci-pipeline-passed
Sep 8 Modify description of pull request
Sep 8 Modify description of pull request
Sep 8 Modify description of pull request
guijianwei
Sep 8 Comments:
Sep 8 Comments:
/approve


於欣洁
Sep 8 Comments:
Sep 8 Comments:
/lgtm
/approve


Sep 8 Removed approver mabing1118
gaoxiang618
Sep 8 Comments:
Sep 8 Comments:
/lgtm
/approve


tang-lei01
Sep 8 Comments:
Sep 8 Comments:
/approve


Sep 8 Added label: approved
monologue815
Sep 8 Comments:
Sep 8 Comments:
/lgtm


Sep 8 Added label: lgtm
Sep 8 Closed associated issue
Sep 8 Merged pull request
描述
GenericBlockSparseAttentionGrad是通用块稀疏注意力的反向计算算子。依据sparseBlockIdx/sparseBlockCount(稀疏块索引表)定义的索引,仅在被选中的KV块上计算和传播梯度,支持动态、可变长的分块稀疏模式。
新增 GenericBlockSparseAttentionGrad 和 generic_block_sparse_attention_grad_metadata算子
关联的Issue
https://gitcode.com/cann/ops-transformer/issues/5110
测试
开发自验证通过
文档更新
NA
类型标签