已合并
MQSMLA\QSMLA\SMLA lse bugfix #9759
Ccccccc创建于 6 天前
MQSMLA\QSMLA\SMLA lse bugfix #9759
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Ccccccc 的贡献)atomgit-bot
6 天前 评论:
6 天前 评论:
变更摘要
此 PR 修复了 MQSMLA / QSMLA / SMLA 三个注意力模块中与 lse(log-sum-exp)相关的 bug。核心变更是移除了三个 golden 测试文件中 GeneralizedSFAQuant 和 GeneralizedSFA 类内多余的 output = output.transpose(0, 1).contiguous() 调用,避免了对输出张量不必要的维度转置,使返回结果保持正确的维度顺序。
主要改动
- 移除
mixed_quant_sparse_flash_mla_golden.py中的多余转置:在GeneralizedSFAQuant类的输出路径中删除output = output.transpose(0, 1).contiguous(),修复混合量化稀疏 Flash MLA 的 lse 计算偏差。 - 移除
quant_sparse_flash_mla_golden.py中的多余转置:在GeneralizedSFAQuant类的输出路径中删除output = output.transpose(0, 1).contiguous(),修复量化稀疏 Flash MLA 的 lse 计算偏差。 - 移除
sparse_flash_mla_golden.py中的多余转置:在GeneralizedSFA类的输出路径中删除output = output.transpose(0, 1).contiguous(),修复稀疏 Flash MLA 的 lse 计算偏差。


6 天前 添加了label:cann-cla/yes
CANN-robot
6 天前 评论:
6 天前 评论:
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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| attention | ✅ haijie_699874, wangzhe123456789 (2/2) | ✅ haijie_699874, wangzhe123456789 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


CANN-robot
6 天前 评论:
6 天前 评论:
Ccccccc
6 天前 评论:
6 天前 评论:
compile


6 天前 update merge request[project id: 7673863, iid: 9759, commit_id: 4dfe86930091c643e84222bda08223af3df82362] virtual merging success
6 天前 update merge request[project id: 7673863, iid: 9759, commit_id: 4dfe86930091c643e84222bda08223af3df82362] virtual merging success
6 天前 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为评审人
6 天前 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为评审人
6 天前 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为审查人
6 天前 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为审查人
6 天前 添加了label:ci-pipeline-running
CANN-robot
6 天前 评论:
6 天前 评论:
流水线任务触发成功
任务链接 [b9e52edd576c41f6b36915fad8b3a813][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_classify | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_harmony-infer-chs-transformer | ✅ SUCCESS | ||
| UT_Test_harmony-infer-cpro-transformer | ✅ SUCCESS | ||
| UT_Test_report_lcov | ⚠️ WARNING | >>>>> |
[2026-08-07 17:59:22] CI执行结束


CANN-robot
6 天前 评论:
6 天前 评论:
流水线任务触发成功
任务链接 [a86b3e06422b4760b23f8b415a7fb4d8][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_style | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_checkpr | ✅ SUCCESS | ||
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-08-07 17:41:23] CI执行结束


6 天前 添加了label:api-check-pass
6 天前 删除了label:ci-pipeline-running
6 天前 添加了label:ci-pipeline-passed
wangzhe123456789
6 天前 评论:
6 天前 评论:
/lgtm
/approve


6 天前 添加了label:approved
张海杰
5 天前 评论:
5 天前 评论:
/approve


5 天前 添加了label:lgtm
5 天前 合入了pull request
描述
MQSMLA\QSMLA\SMLA lse bugfix
关联的Issue
测试
文档更新
类型标签