已合并
MQSMLA\QSMLA\SMLA lse bugfix #9759
MQSMLA\QSMLA\SMLA lse bugfix #9759
已合并
Ccccccc创建于 6 天前
Ccccccc
Ccccccc成员
6 天前

描述

MQSMLA\QSMLA\SMLA lse bugfix

关联的Issue

测试

文档更新

类型标签

  • 🐛 Bug修复
  • ✨ 新特性
  • ⚡ 性能优化
  • ♻️ 重构
  • 🧪 测试
  • 📦 构建/CI
  • 🔧 配置变更
  • 📝 文档更新
  • ⬆️ 依赖升级
  • 🔒 安全修复
  • 🧹 代码清理
  • ❓ 其他,请描述:
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Ccccccc 的贡献)
CccccccCcccccc成员
6 天前 创建了 pull request,commit c66ab7c4
atomgit-bot
atomgit-bot
6 天前 评论:

变更摘要

此 PR 修复了 MQSMLA / QSMLA / SMLA 三个注意力模块中与 lse(log-sum-exp)相关的 bug。核心变更是移除了三个 golden 测试文件中 GeneralizedSFAQuantGeneralizedSFA 类内多余的 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 计算偏差。
likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
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 /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

CLA Signature Pass

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

likedislike
Ccccccc
Ccccccc成员
6 天前 评论:

compile

likedislike
CccccccCcccccc成员
6 天前 update merge request[project id: 7673863, iid: 9759, commit_id: 4dfe86930091c643e84222bda08223af3df82362] virtual merging success
CANN-robotCANN-robot成员
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设为评审人
CANN-robotCANN-robot成员
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设为审查人
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
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执行结束

likedislike
CANN-robot
CANN-robot成员
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执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-passed
wangzhe123456789成员
6 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:approved
张海杰
张海杰成员
5 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:lgtm
CANN-robotCANN-robot成员
5 天前 合入了pull request