已合并
feat: 增加RmsNormDynamicMxQuant infershape UT覆盖率 #5495
raoliang_sac创建于 5月30日
feat: 增加RmsNormDynamicMxQuant infershape UT覆盖率 #5495
已合并
raoliang_sac创建于 5月30日
raoliang_sac成员
5月30日

描述

RmsNormDynamicMxQuant 算子的 op_host 覆盖率不足:

  • rms_norm_dynamic_mx_quant_infershape.cpp 行覆盖率仅 72.9% (43/59),函数覆盖率 66.7% (2/3)

未覆盖路径:

  1. UnknownRank 路径(IsUnknownRank 分支,output_rstd=false/true)
  2. UNKNOWN_DIM_VALUE 路径(last dim=-1,output_rstd=false/true)
  3. InferDataType 多个 dst_type 分支(40/41/36)未测试
  4. InferDataType 非法 dst_type 失败路径未测试

修改内容:
新增 8 个测试用例覆盖上述路径,预计行覆盖率提升至 90%+,函数覆盖率提升至 100%

关联的Issue

https://gitcode.com/cann/ops-nn/issues/3005

测试

新增 8 个单元测试用例,覆盖 UnknownRank、UNKNOWN_DIM_VALUE、多种 dst_type 分支及非法 dst_type 失败路径,本地编译运行全部通过。

文档更新

无

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 raoliang_sac 的贡献)
Rraoliang_sac成员
5月30日 创建了 pull request,commit 1f7164bf
CANN-robotCANN-robot成员
5月30日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
5月30日 评论:

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
norm ✅ 周奇龙, 范其瑞 (2/2) ✅ 周奇龙 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
Rraoliang_sac成员
5月30日 修改了pull request 的描述
Rraoliang_sac成员
5月30日 修改了pull request 的描述
raoliang_sac成员
5月30日 评论:

compile

likedislike
Rraoliang_sac成员
5月30日 预合并成功(commit_id: 96b0b7f6a9025d2c743ab340cceb1946827e97ce)
CANN-robotCANN-robot成员
5月30日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月30日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-05-30 18:51:15]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
5月30日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
SCA ✅ SUCCESS >>>>>

[2026-05-30 18:43:18]    CI执行结束

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

Notification

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

likedislike
raoliang_sac成员
6月2日 评论:

compile

likedislike
Rraoliang_sac成员
6月2日 预合并成功(commit_id: d9cd206d10ed47adff4fc21071f6dc5e06b1a469)
CANN-robotCANN-robot成员
6月2日 删除了label:api-check-pass
CANN-robotCANN-robot成员
6月2日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月2日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-06-02 11:00:09]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6月2日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
SCA ✅ SUCCESS >>>>>

[2026-06-02 10:53:29]    CI执行结束

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

Notification

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

likedislike
raoliang_sac成员
6月4日 评论:

compile

likedislike
Rraoliang_sac成员
6月4日 预合并成功(commit_id: 1b49a80a5da907a85e4e7a876070e47763888a14)
CANN-robotCANN-robot成员
6月4日 删除了label:api-check-pass
CANN-robotCANN-robot成员
6月4日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月4日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-06-04 14:58:01]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6月4日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
SCA ✅ SUCCESS >>>>>

[2026-06-04 14:48:07]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6月4日 添加了label:api-check-pass
CANN-robotCANN-robot成员
6月4日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月4日 添加了label:ci-pipeline-passed
Rraoliang_sac成员
6月4日 修改了pull request 的描述
raoliang_sac成员
6月5日 评论:

@zhou-qilong 龙哥 麻烦加个分

likedislike
sunday成员
6月5日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月5日 添加了label:approved
范其瑞
范其瑞成员
6月5日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月5日 添加了label:lgtm
CANN-robotCANN-robot成员
6月5日 关闭了关联的issue
CANN-robotCANN-robot成员
6月5日 合入了pull request