Closed
【Feature】triton算子(chunk_kda_bwd_kernel_wy_dqkg_fused)迁移mindspeed-ops仓 #8
LinShuaAdd on May 18Closed at Sep 22
May 18 Change title to "【Feature】triton算子(chunk_kda_bwd_kernel_wy_dqkg_fused)迁移mindspeed-ops仓", originally titled "【Feature】triton算子(chunk_gla_fwd_o_gk)迁移mindspeed-ops仓".
Ronald1995
Jun 11 Comments:
Jun 11 Comments:
/label add good-first-issue


Jun 11 Added label: good-first-issue
wangx700
Jun 12 Comments:
Jun 12 Comments:
/label add triage-review


Jun 12 Added label: triage-review
ryouyouuuu
Jun 25 Comments:
Jun 25 Comments:
认领这个任务


Ronald1995
Jun 25 Comments:
Jun 25 Comments:


Ronald1995
Jun 25 Comments:
Jun 25 Comments:
任务关闭


Jul 2 associated Kanban: @zeshengzong的看板 20260702
Jul 3 associated Kanban: MindStudio ISSUE管理
梵高的呐喊
Sep 17 Comments:
Sep 17 Comments:
认领该任务


xmz
Sep 22 Comments:
Sep 22 Comments:
该算子已开发上库,任务完成,关闭本 Issue。
证据:
- 仓库维护者 @Ronald1995 于 2026-06-25 在本 Issue 回复「这个算子已经开发上库了」,并标注「任务关闭」。
- PR #26([Feat] Add chunk kda backward op for Kimi Linear)已合入,后续 PR #105/#111 修复了精度问题。
- master 已包含实现
mindspeed_ops/api/triton/chunk_kda_bwd.py(含 wy_dqkg_fused kernel)、UTtests/unit_tests/triton/test_chunk_kda_bwd.py、ATK 用例tests/atk_tests/triton/chunk_kda_bwd/、算子文档docs/zh/triton/chunk_kda_bwd.md。


Sep 22 Added label: resolved
任务描述
基于fla-org/flash-linear-attention开源仓库的triton源码,迁移优化triton算子在NPU上跑通及性能优化。
本期任务的具体信息如下:
(1)算子名称:chunk_kda_bwd_kernel_wy_dqkg_fused
(2) fla-org/flash-linear-attention开放仓库的算子源码链接:
https://github.com/fla-org/flash-linear-attention/blob/v0.4.1/fla/ops/kda/chunk_bwd.py
(3) 迁移指导文档:https://gitcode.com/Ascend/triton-ascend/blob/main/docs/zh/programming_guide.md
参考 skill 地址:https://gitcode.com/Ascend/agent-skills/tree/master/skills/simple-vector-triton-gpu-to-npu
(4) 开发平台:Atlas 800T A2或者A3
验收标准
一、任务交付件
本期任务为基于fla-org/flash-linear-attention开放仓库代码进行功能扩展,请合入开发代码。主要开发点如下:
(1) triton算子针对NPU的适配修改优化后的代码
(2) 针对该triton算子的测试用例UT
二、验收标准:
1)精度/性能要求
精度:
对比GPU相同输入算子精度误差小于0.1%
若无GPU标杆,与CPU小算子对齐,精度误差小于0.1%
性能:
补充说明:具体性能对比数据呈现,按 CV类算子达到0.7x竞品, VV类算子达到0.9x竞品
以下以竞品A100为例说明计算具体的性能对比要求:
910B2 VS A100
计算式子:以CV类算子的Cube算力bound场景为例:1.13 * 0.7 =0.8
2)实践文档:
triton算子介绍1篇
3)任务完成标准
本次任务完成标准为:
精度/性能(根据实际要求)达标,PR完成合入,实践文档提交到仓库issue。
PR 合入
本地完成测试验证后,向MindSpeed-Ops的master分支发起PR。
对接人
LinSHua
欢迎加入社区,感谢您对社区的贡献 🎉!