已合并
MQSMLA pytest support only run case in excel #8650
MQSMLA pytest support only run case in excel #8650
已合并
郑文惠创建于 7月13日
郑文惠
郑文惠成员
7月13日

描述

MQSMLA pytest support only run case in excel

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 郑文惠 的贡献)
郑文惠郑文惠成员
7月13日 创建了 pull request,commit 3ee8b28b
atomgit-bot
atomgit-bot
7月13日 评论:

变更摘要

此 PR 主要对 MQSMLA(Mixed Quant Sparse Flash MLA)的 pytest 测试框架进行了重构:将命名从 QSMLA/qsmla 统一更正为 MQSMLA/mqsmla;新增通过 Excel 表格筛选指定用例的功能(MQSMLA_BATCH_TEST_MODE=1);同时修复了 Network.forward 中算子调用时将 ori_topk_lengthcmp_topk_lengthcu_seqlens_ori_kvcu_seqlens_cmp_kv 等参数从硬编码 None 改为正确传入实际值的问题。

主要改动

  • 统一命名 QSMLA → MQSMLA:所有文件中的函数名(如 test_qsmla_quant_process_citest_mqsmla_quant_process_ci)、内部函数(如 qsmlamqsmla)、环境变量前缀(如 QSMLA_PT_DIRMQSMLA_PT_DIR)及默认目录名(qsmla_testcasemqsmla_testcase)均统一更名为 MQSMLA。

  • 新增 Excel 表格筛选批跑模式:在 test_mixed_quant_sparse_flash_mla_batch.pytest_mixed_quant_sparse_flash_mla_batch_graph.py 中引入 MQSMLA_BATCH_TEST_MODE 环境变量,当值为 1 时从 MQSMLA_EXCEL_PATH 指定的 Excel 中读取 Testcase_Name 列,仅运行匹配的 .pt 用例文件。

  • 修复算子参数传递mixed_quant_sparse_flash_mla_process.pyNetwork.forward 原先对 ori_topk_lengthcmp_topk_length 硬编码传 None,对 cu_seqlens_ori_kv/cu_seqlens_cmp_kv 在调用算子时才调用 .npu();现在改为直接使用函数入参。同步在 test_mqsmla_quant_process_graph 中显式传入 cu_seqlens_ori_kvcu_seqlens_cmp_kv 参数。

  • 结果保存路径类型修正test_mixed_quant_sparse_flash_mla_batch.pytest_mixed_quant_sparse_flash_mla_batch_graph.py 中调用 utils.save_result 时,结果路径由 result_path(字符串)改为 Path(result_path),确保路径对象类型一致。

likedislike
CANN-robotCANN-robot成员
7月13日 添加了label:cann-cla/yes
郑文惠郑文惠成员
7月13日 修改标题为 “MQSMLA pytest support only run case in excel”,原标题为“QSMLA pytest support only run case in excel”
CANN-robot
CANN-robot成员
7月13日 评论:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
7月13日 评论:

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 wangzhe123456789, tang-hao-hw-gitcode (2/2) wangzhe123456789, tang-hao-hw-gitcode (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
7月13日 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为评审人
郑文惠郑文惠成员
7月13日 修改了pull request 的描述
CANN-robotCANN-robot成员
7月13日 将hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,huang_li,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,yuhao_,L_Euler设为审查人
郑文惠
郑文惠成员
7月13日 评论:

/compile

likedislike
郑文惠郑文惠成员
7月13日 update merge request[project id: 7673863, iid: 8650, commit_id: f410f860a80c657fb281f33411aa8368cbfc6cf5] virtual merging success
CANN-robotCANN-robot成员
7月13日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月13日 评论:

流水线任务触发成功
任务链接 [546d7f9d56304b0f879a1ff97c995941][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_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_harmony-infer-chs-transformer ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-07-13 15:54:34]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月13日 评论:

流水线任务触发成功
任务链接 [de4309a3f2a045f88564b60cb5d591f7][流水线指导]

任务名称状态日志下载链接
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-07-13 15:38:25]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7月13日 添加了label:api-check-pass
此处折叠了5条事件消息 查看更多
CANN-robotCANN-robot成员
7月13日 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
7月13日 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
郑文惠
郑文惠成员
7月13日 评论:

/compile

likedislike
郑文惠郑文惠成员
7月13日 update merge request[project id: 7673863, iid: 8650, commit_id: d41170de75d4c2dba7020477cb615809f727f507] virtual merging success
CANN-robotCANN-robot成员
7月13日 删除了label:api-check-pass
CANN-robotCANN-robot成员
7月13日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月13日 评论:

流水线任务触发成功
任务链接 [7d3fb740ad164402a3b53c9aa9e2b585][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_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_harmony-infer-chs-transformer ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-07-13 16:38:13]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月13日 评论:

流水线任务触发成功
任务链接 [352ae745c78a40cb83e080c5dff899da][流水线指导]

任务名称状态日志下载链接
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-07-13 16:19:06]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7月13日 添加了label:api-check-pass
CANN-robotCANN-robot成员
7月13日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月13日 添加了label:ci-pipeline-passed
tang-hao-hw-gitcode成员
7月14日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7月14日 添加了label:approved
wangzhe123456789成员
7月14日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
7月14日 添加了label:lgtm
CANN-robotCANN-robot成员
7月14日 合入了pull request